mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Achieve CHIM and get rid of the loop
This commit is contained in:
parent
5cd781b3eb
commit
0fcb75fb21
1 changed files with 1 additions and 7 deletions
|
@ -408,12 +408,6 @@ bool ContentSelectorModel::ContentModel::dropMimeData(const QMimeData *data, Qt:
|
||||||
|
|
||||||
void ContentSelectorModel::ContentModel::addFile(EsmFile *file)
|
void ContentSelectorModel::ContentModel::addFile(EsmFile *file)
|
||||||
{
|
{
|
||||||
for (int row = 0; row < mFiles.size(); row++)
|
|
||||||
{
|
|
||||||
if (!mFiles.at(row)->fileName().compare(file->fileName(), Qt::CaseInsensitive))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
beginInsertRows(QModelIndex(), mFiles.count(), mFiles.count());
|
beginInsertRows(QModelIndex(), mFiles.count(), mFiles.count());
|
||||||
mFiles.append(file);
|
mFiles.append(file);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
@ -434,7 +428,7 @@ void ContentSelectorModel::ContentModel::addFiles(const QString &path)
|
||||||
{
|
{
|
||||||
QFileInfo info(dir.absoluteFilePath(path2));
|
QFileInfo info(dir.absoluteFilePath(path2));
|
||||||
|
|
||||||
if (item(info.absoluteFilePath()) != 0)
|
if (item(info.fileName()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue