NOISSUE Update and sort modlist after adding mods

This commit is contained in:
robotbrain 2015-01-03 12:50:03 -05:00 committed by Petr Mrázek
parent 85756d0e78
commit acb3346409

View File

@ -65,7 +65,7 @@ void ModList::stopWatching()
void ModList::internalSort(QList<Mod> &what)
{
auto predicate = [](const Mod & left, const Mod & right)
auto predicate = [](const Mod &left, const Mod &right)
{
if (left.name() == right.name())
{
@ -259,7 +259,7 @@ bool ModList::installMod(const QFileInfo &filename, int index)
auto right = this->index(index, columnCount(QModelIndex()) - 1);
emit dataChanged(left, right);
saveListFile();
emit changed();
update();
return true;
}
return false;
@ -278,7 +278,7 @@ bool ModList::installMod(const QFileInfo &filename, int index)
mods.insert(index, m);
endInsertRows();
saveListFile();
emit changed();
update();
return true;
}
else if (type == Mod::MOD_FOLDER)
@ -293,7 +293,7 @@ bool ModList::installMod(const QFileInfo &filename, int index)
mods.insert(index, m);
endInsertRows();
saveListFile();
emit changed();
update();
return true;
}
return false;