diff options
| author | Tannin <devnull@localhost> | 2015-05-24 18:51:03 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-05-24 18:51:03 +0200 |
| commit | 02cc97a58d7cda800b8c431dfeaa3242e5f0b69d (patch) | |
| tree | 3a6daf855967f41e8ef189a1411dbf31b86da1cf /src/organizercore.cpp | |
| parent | ffd94e72b4ae137854e1ff3c96ff88eb48cea140 (diff) | |
- bugfix: bsa order wasn't correctly restored.
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index c065e587..a62c881d 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -528,7 +528,6 @@ void OrganizerCore::setCurrentProfile(const QString &profileName) m_ModList.setProfile(newProfile);
connect(m_CurrentProfile, SIGNAL(modStatusChanged(uint)), this, SLOT(modStatusChanged(uint)));
-
refreshDirectoryStructure();
}
@@ -928,7 +927,7 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary, const QString & prepareStart();
if (!binary.exists()) {
- reportError(tr("Executable \"%1\" not found").arg(binary.fileName()));
+ reportError(tr("Executable \"%1\" not found").arg(binary.absoluteFilePath()));
return INVALID_HANDLE_VALUE;
}
@@ -1223,7 +1222,9 @@ void OrganizerCore::updateModInDirectoryStructure(unsigned int index, ModInfo::P if (m_UserInterface != nullptr) {
m_UserInterface->archivesWriter().write();
}
- m_DirectoryRefresher.setMods(m_CurrentProfile->getActiveMods(), enabledArchives());
+ std::vector<QString> archives = enabledArchives();
+ m_DirectoryRefresher.setMods(m_CurrentProfile->getActiveMods(),
+ std::set<QString>(archives.begin(), archives.end()));
// finally also add files from bsas to the directory structure
m_DirectoryRefresher.addModBSAToStructure(m_DirectoryStructure
@@ -1290,13 +1291,13 @@ IPluginGame *OrganizerCore::managedGame() const return m_GamePlugin;
}
-std::set<QString> OrganizerCore::enabledArchives()
+std::vector<QString> OrganizerCore::enabledArchives()
{
- std::set<QString> result;
+ std::vector<QString> result;
QFile archiveFile(m_CurrentProfile->getArchivesFileName());
if (archiveFile.open(QIODevice::ReadOnly)) {
while (!archiveFile.atEnd()) {
- result.insert(QString::fromUtf8(archiveFile.readLine()).trimmed());
+ result.push_back(QString::fromUtf8(archiveFile.readLine()).trimmed());
}
archiveFile.close();
}
@@ -1310,8 +1311,9 @@ void OrganizerCore::refreshDirectoryStructure() m_DirectoryUpdate = true;
std::vector<std::tuple<QString, QString, int> > activeModList = m_CurrentProfile->getActiveMods();
-
- m_DirectoryRefresher.setMods(activeModList, enabledArchives());
+ auto archives = enabledArchives();
+ m_DirectoryRefresher.setMods(activeModList,
+ std::set<QString>(archives.begin(), archives.end()));
QTimer::singleShot(0, &m_DirectoryRefresher, SLOT(refresh()));
}
|
