From ac4beedbd7cf4da766ffc81652ccf5ba2cddc468 Mon Sep 17 00:00:00 2001 From: NieGrzegorz Date: Thu, 11 Oct 2018 15:04:57 +0200 Subject: [PATCH] Don't show the "Load Options" dialog when choosing "Don't open any file" (#800) * Don't show the "Load Options" dialog when choosing "Don't open any file" #712 * Load option only if skipOptionsDialog flag isn't set --- src/MainWindow.cpp | 7 +++++-- src/dialogs/NewFileDialog.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index f0fa2865..eba8f127 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -370,12 +370,15 @@ void MainWindow::displayInitialOptionsDialog(const InitialOptions &options, bool { auto o = new InitialOptionsDialog(this); o->setAttribute(Qt::WA_DeleteOnClose); - o->loadOptions(options); - o->show(); if (skipOptionsDialog) { o->setupAndStartAnalysis(); } + else + { + o->loadOptions(options); + o->show(); + } } void MainWindow::openProject(const QString &project_name) diff --git a/src/dialogs/NewFileDialog.cpp b/src/dialogs/NewFileDialog.cpp index 2aac7283..945a7538 100644 --- a/src/dialogs/NewFileDialog.cpp +++ b/src/dialogs/NewFileDialog.cpp @@ -369,7 +369,7 @@ void NewFileDialog::loadFile(const QString &filename) ioFile += filename; InitialOptions options; options.filename = ioFile; - main->openNewFile(options); + main->openNewFile(options, ui->checkBox_FilelessOpen->isChecked()); close(); }