From 4505d187c4074d855e153a99548b4e9c623e6e8a Mon Sep 17 00:00:00 2001 From: Itay Cohen Date: Wed, 2 Jan 2019 15:40:46 +0200 Subject: [PATCH] Set Analysis configuration before executing Analysis commands (#1048) * Set analysis configurations defined by the user before executing the analysis commands (fixes #1047) * Remove (probably) unnecessary lines which reset settings determined by the user --- src/MainWindow.cpp | 4 ---- src/dialogs/InitialOptionsDialog.cpp | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 353b32ca..be55630d 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -378,10 +378,6 @@ void MainWindow::openProject(const QString &project_name) void MainWindow::finalizeOpen() { core->getOpcodes(); - - // Override any incorrect setting saved in the project - core->setSettings(); - core->updateSeek(); core->message(tr(" > Populating UI")); refreshAll(); diff --git a/src/dialogs/InitialOptionsDialog.cpp b/src/dialogs/InitialOptionsDialog.cpp index b6cc2462..277cc39b 100644 --- a/src/dialogs/InitialOptionsDialog.cpp +++ b/src/dialogs/InitialOptionsDialog.cpp @@ -178,6 +178,16 @@ QList InitialOptionsDialog::getSelectedAdvancedAnalCmds() { QList advanced = QList(); if (ui->analSlider->value() == 3) { + // Enable analysis configurations before executing analysis commands + if (ui->jmptbl->isChecked()) { + advanced << "e! anal.jmptbl"; + } + if (ui->pushret->isChecked()) { + advanced << "e! anal.pushret"; + } + if (ui->hasnext->isChecked()) { + advanced << "e! anal.hasnext"; + } if (ui->aa_symbols->isChecked()) { advanced << "aa"; } @@ -208,15 +218,6 @@ QList InitialOptionsDialog::getSelectedAdvancedAnalCmds() if (ui->aap_preludes->isChecked()) { advanced << "aap"; } - if (ui->jmptbl->isChecked()) { - advanced << "e! anal.jmptbl"; - } - if (ui->pushret->isChecked()) { - advanced << "e! anal.pushret"; - } - if (ui->hasnext->isChecked()) { - advanced << "e! anal.hasnext"; - } } return advanced; }