summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f68d9846..3f88f5ad 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2861,12 +2861,21 @@ void MainWindow::createEmptyMod_clicked()
return;
}
+ int newPriority = -1;
+ if (m_ContextRow >= 0 && m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY) {
+ newPriority = m_OrganizerCore.currentProfile()->getModPriority(m_ContextRow);
+ }
+
IModInterface *newMod = m_OrganizerCore.createMod(name);
if (newMod == nullptr) {
return;
}
m_OrganizerCore.refreshModList();
+
+ if (newPriority >= 0) {
+ m_OrganizerCore.modList()->changeModPriority(ModInfo::getIndex(name), newPriority);
+ }
}
void MainWindow::createSeparator_clicked()