diff options
| author | Tannin <devnull@localhost> | 2015-05-11 21:40:35 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-05-11 21:40:35 +0200 |
| commit | 0f1271dd991ba9d67181114f75c80e14e8bfd596 (patch) | |
| tree | 732928f08f16ba8d3520fb71722b651e31810289 | |
| parent | dbdc2538f98147c7661cac00fe135df59aeb04e3 (diff) | |
- bugfix: moving a mod didn't properly update conflict highlighting
| -rw-r--r-- | src/mainwindow.cpp | 8 | ||||
| -rw-r--r-- | src/organizercore.cpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b5347d4d..135bdf8c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1854,6 +1854,14 @@ void MainWindow::modorder_changed() QModelIndex current = ui->modList->currentIndex();
if (current.isValid()) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(current.data(Qt::UserRole + 1).toInt());
+ // clear caches on all mods conflicting with the moved mod
+ for (int i : modInfo->getModOverwrite()) {
+ ModInfo::getByIndex(i)->clearCaches();
+ }
+ for (int i : modInfo->getModOverwritten()) {
+ ModInfo::getByIndex(i)->clearCaches();
+ }
+ // update conflict check on the moved mod
modInfo->doConflictCheck();
m_OrganizerCore.modList()->setOverwriteMarkers(modInfo->getModOverwrite(), modInfo->getModOverwritten());
if (m_ModListSortProxy != nullptr) {
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index bc22c91c..9e6309cd 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -347,6 +347,7 @@ void OrganizerCore::setUserInterface(IUserInterface *userInterface, QWidget *wid connect(&m_ModList, SIGNAL(removeSelectedMods()), widget, SLOT(removeMod_clicked()));
connect(&m_ModList, SIGNAL(requestColumnSelect(QPoint)), widget, SLOT(displayColumnSelection(QPoint)));
connect(&m_ModList, SIGNAL(fileMoved(QString, QString, QString)), widget, SLOT(fileMoved(QString, QString, QString)));
+ connect(&m_ModList, SIGNAL(modorder_changed()), widget, SLOT(modorder_changed()));
connect(&m_DownloadManager, SIGNAL(showMessage(QString)), widget, SLOT(showMessage(QString)));
}
|
