summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-11-22 17:45:34 +0100
committerTannin <devnull@localhost>2013-11-22 17:45:34 +0100
commitdb0347212a509b9ceef1cede61a4afd7d2253014 (patch)
tree406caa067ebf0a67cd42d08e684202703084e3a8 /src/mainwindow.cpp
parent5895a1a92d1f0463cec276c22e32f528a309d31c (diff)
- bugfix: installFile for mods was not a relative path if the downloads directory was non-default
- bugfix: crash after removing the last profile in the list (ordered alphabetically) - improved subdirs ordering to ensure pythonrunner is compiled before pythonproxy - translation files for plugins are now generated - set some texts as un-translatable where it made no sense - staging script now re-builds MO completely before packaging - updated qt libraries for packaging to 4.8.5 - added python to the package
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a8026b68..31ee1ae7 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -223,6 +223,7 @@ MainWindow::MainWindow(const QString &exeName, QSettings &initSettings, QWidget
NexusInterface::instance()->setNMMVersion(m_Settings.getNMMVersion());
m_InstallationManager.setModsDirectory(m_Settings.getModDirectory());
+ m_InstallationManager.setDownloadDirectory(m_Settings.getDownloadDirectory());
updateDownloadListDelegate();
@@ -1435,6 +1436,12 @@ void MainWindow::on_profileBox_currentIndexChanged(int index)
saveCurrentLists();
}
+ // ensure the new index is valid
+ if (index < 0 || index >= ui->profileBox->count()) {
+ qDebug("invalid profile index, using last profile");
+ ui->profileBox->setCurrentIndex(ui->profileBox->count() - 1);
+ }
+
if (ui->profileBox->currentIndex() == 0) {
ProfilesDialog(m_GamePath).exec();
while (!refreshProfiles()) {
@@ -3909,6 +3916,7 @@ void MainWindow::on_actionSettings_triggered()
bool proxy = m_Settings.useProxy();
m_Settings.query(this);
m_InstallationManager.setModsDirectory(m_Settings.getModDirectory());
+ m_InstallationManager.setDownloadDirectory(m_Settings.getDownloadDirectory());
fixCategories();
refreshFilters();
if (QDir::fromNativeSeparators(m_DownloadManager.getOutputDirectory()) != QDir::fromNativeSeparators(m_Settings.getDownloadDirectory())) {