summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 38b01563..2d1febea 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -358,6 +358,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)));
}
@@ -515,6 +516,10 @@ void OrganizerCore::createDefaultProfile()
void OrganizerCore::setCurrentProfile(const QString &profileName)
{
+ if ((m_CurrentProfile != nullptr) &&
+ (profileName == m_CurrentProfile->name())) {
+ return;
+ }
QString profileDir = qApp->property("dataPath").toString() + "/" + ToQString(AppConfig::profilesPath()) + "/" + profileName;
Profile *newProfile = new Profile(QDir(profileDir), managedGame());
@@ -1116,6 +1121,11 @@ void OrganizerCore::refreshModList(bool saveChanges)
void OrganizerCore::refreshESPList()
{
+ if (m_DirectoryUpdate) {
+ // don't mess up the esp list if we're currently updating the directory structure
+ m_PostRefreshTasks.append([this] () { this->refreshESPList(); });
+ return;
+ }
m_CurrentProfile->modlistWriter().write();
// clear list