From ec2807a8979a9c7e816857276a720598623f9cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sat, 25 Aug 2018 13:23:31 +0200 Subject: [PATCH] Fix Companion Script --- src/MainWindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 4d741bc4..b6cec28c 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -314,14 +314,13 @@ void MainWindow::openNewFile(InitialOptions options, bool skipOptionsDialog) /* Prompt to load filename.r2 script */ if (options.script.isEmpty()) { QString script = QString("%1.r2").arg(this->filename); - QString loadScript; if (r_file_exists(script.toStdString().data())) { QMessageBox mb; mb.setWindowTitle(tr("Script loading")); mb.setText(tr("Do you want to load the '%1' script?").arg(script)); mb.setStandardButtons(QMessageBox::Yes | QMessageBox::No); if (mb.exec() == QMessageBox::Yes) { - loadScript = script; + options.script = script; } } }