From a7da42fb85b5c9429d88def142e3fe0350e8a548 Mon Sep 17 00:00:00 2001 From: ismail Date: Thu, 30 Mar 2023 06:54:09 +0530 Subject: [PATCH] graph_widget_address_view_fix --- src/common/Configuration.cpp | 2 +- src/dialogs/preferences/AsmOptionsWidget.cpp | 6 +++--- src/dialogs/preferences/GraphOptionsWidget.cpp | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/common/Configuration.cpp b/src/common/Configuration.cpp index 7fc76715..f2408548 100644 --- a/src/common/Configuration.cpp +++ b/src/common/Configuration.cpp @@ -136,7 +136,7 @@ static const QHash asmOptions = { { "asm.esil", false }, { "asm.reloff.flags", false }, { "esil.breakoninvalid", true }, { "dbg.trace_continue", true }, - { "graph.offset", false } }; + { "ag.offset", false } }; Configuration::Configuration() : QObject(), nativePalette(qApp->palette()) { diff --git a/src/dialogs/preferences/AsmOptionsWidget.cpp b/src/dialogs/preferences/AsmOptionsWidget.cpp index dd5cb7a0..dd73daa1 100644 --- a/src/dialogs/preferences/AsmOptionsWidget.cpp +++ b/src/dialogs/preferences/AsmOptionsWidget.cpp @@ -79,7 +79,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars() ui->cmtcolSpinBox->setEnabled(cmtRightEnabled); bool offsetsEnabled = - Config()->getConfigBool("asm.offset") || Config()->getConfigBool("graph.offset"); + Config()->getConfigBool("asm.offset") || Config()->getConfigBool("ag.offset"); ui->relOffsetLabel->setEnabled(offsetsEnabled); ui->relOffsetCheckBox->setEnabled(offsetsEnabled); ui->relOffFlagsCheckBox->setEnabled(Config()->getConfigBool("asm.offset") @@ -288,8 +288,8 @@ void AsmOptionsWidget::asmComboBoxChanged(int index) void AsmOptionsWidget::offsetCheckBoxToggled(bool checked) { - ui->relOffsetLabel->setEnabled(checked || Config()->getConfigBool("graph.offset")); - ui->relOffsetCheckBox->setEnabled(checked || Config()->getConfigBool("graph.offset")); + ui->relOffsetLabel->setEnabled(checked || Config()->getConfigBool("ag.offset")); + ui->relOffsetCheckBox->setEnabled(checked || Config()->getConfigBool("ag.offset")); ui->relOffFlagsCheckBox->setEnabled(checked && Config()->getConfigBool("asm.reloff")); } diff --git a/src/dialogs/preferences/GraphOptionsWidget.cpp b/src/dialogs/preferences/GraphOptionsWidget.cpp index 13bb0922..30d7227b 100644 --- a/src/dialogs/preferences/GraphOptionsWidget.cpp +++ b/src/dialogs/preferences/GraphOptionsWidget.cpp @@ -42,7 +42,7 @@ GraphOptionsWidget::~GraphOptionsWidget() {} void GraphOptionsWidget::updateOptionsFromVars() { qhelpers::setCheckedWithoutSignals(ui->graphOffsetCheckBox, - Config()->getConfigBool("graph.offset")); + Config()->getConfigBool("ag.offset")); ui->maxColsSpinBox->blockSignals(true); ui->maxColsSpinBox->setValue(Config()->getGraphBlockMaxChars()); ui->maxColsSpinBox->blockSignals(false); @@ -80,8 +80,11 @@ void GraphOptionsWidget::on_minFontSizeSpinBox_valueChanged(int value) void GraphOptionsWidget::on_graphOffsetCheckBox_toggled(bool checked) { - Config()->setConfig("graph.offset", checked); - emit Core()->asmOptionsChanged(); + Config()->setConfig("ag.offset", checked); + Config()->setConfig("asm.offset", checked); + //Config()->getConfigBool('') + //emit Core()->asmOptionsChanged(); + Core()->triggerAsmOptionsChanged(); triggerOptionsChanged(); }