From 7a71a9eb9e1f1c8e0681038105a6bb8ba888077b Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Sun, 30 Dec 2018 15:16:06 +0100 Subject: Fix a bug where downloadlist context actions run multiple times --- src/mainwindow.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 80ddf093..b618a661 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -341,7 +341,7 @@ MainWindow::MainWindow(QSettings &initSettings ui->openFolderMenu->setMenu(openFolderMenu()); - updateDownloadListDelegate(); + initDownloadList(); ui->savegameList->installEventFilter(this); ui->savegameList->setMouseTracking(true); @@ -4657,8 +4657,6 @@ void MainWindow::on_actionSettings_triggered() NexusInterface::instance(&m_PluginContainer)->setNMMVersion(settings.getNMMVersion()); - updateDownloadListDelegate(); - m_OrganizerCore.updateVFSParams(settings.logLevel(), settings.crashDumpsType(), settings.executablesBlacklist()); m_OrganizerCore.cycleDiagnostics(); } @@ -4713,13 +4711,11 @@ void MainWindow::languageChange(const QString &newLanguage) createHelpWidget(); - updateDownloadListDelegate(); updateProblemsButton(); ui->listOptionsBtn->setMenu(modListContextMenu()); ui->openFolderMenu->setMenu(openFolderMenu()); - } void MainWindow::writeDataToFile(QFile &file, const QString &directory, const DirectoryEntry &directoryEntry) @@ -5150,7 +5146,7 @@ void MainWindow::on_actionEndorseMO_triggered() } -void MainWindow::updateDownloadListDelegate() +void MainWindow::initDownloadList() { DownloadListSortProxy *sortProxy = new DownloadListSortProxy(m_OrganizerCore.downloadManager(), ui->downloadView); sortProxy->setSourceModel(new DownloadList(m_OrganizerCore.downloadManager(), ui->downloadView)); -- cgit v1.3.1