diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlistbypriorityproxy.cpp | 5 | ||||
| -rw-r--r-- | src/modlistbypriorityproxy.h | 2 | ||||
| -rw-r--r-- | src/organizercore.cpp | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/modlistbypriorityproxy.cpp b/src/modlistbypriorityproxy.cpp index ac50e823..7dae7a54 100644 --- a/src/modlistbypriorityproxy.cpp +++ b/src/modlistbypriorityproxy.cpp @@ -41,7 +41,10 @@ void ModListByPriorityProxy::setProfile(Profile* profile) void ModListByPriorityProxy::setSortOrder(Qt::SortOrder order) { - m_sortOrder = order; + if (m_sortOrder != order) { + m_sortOrder = order; + onModelLayoutChanged(); + } } void ModListByPriorityProxy::buildMapping() diff --git a/src/modlistbypriorityproxy.h b/src/modlistbypriorityproxy.h index 77e0fe3d..0629bef7 100644 --- a/src/modlistbypriorityproxy.h +++ b/src/modlistbypriorityproxy.h @@ -54,7 +54,7 @@ public slots: protected slots: void onModelRowsRemoved(const QModelIndex& parent, int first, int last); - void onModelLayoutChanged(const QList<QPersistentModelIndex>& parents, LayoutChangeHint hint); + void onModelLayoutChanged(const QList<QPersistentModelIndex>& parents = {}, LayoutChangeHint hint = LayoutChangeHint::NoLayoutChangeHint); void onModelReset(); void onModelDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles = QVector<int>()); diff --git a/src/organizercore.cpp b/src/organizercore.cpp index d5c341a9..d6c22d3c 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -744,7 +744,7 @@ ModInfo::Ptr OrganizerCore::installDownload(int index, int priority) GuessedValue<QString> modName; // see if there already are mods with the specified mod id - if (modID != 0) { + if (modID > 0) { std::vector<ModInfo::Ptr> modInfo = ModInfo::getByModID(gameName, modID); for (auto iter = modInfo.begin(); iter != modInfo.end(); ++iter) { std::vector<ModInfo::EFlag> flags = (*iter)->getFlags(); |
