graph_widget_address_view_fix

This commit is contained in:
ismail 2023-03-30 06:54:09 +05:30
parent d3ee310a21
commit a7da42fb85
3 changed files with 10 additions and 7 deletions

View File

@ -136,7 +136,7 @@ static const QHash<QString, QVariant> asmOptions = { { "asm.esil", false },
{ "asm.reloff.flags", false }, { "asm.reloff.flags", false },
{ "esil.breakoninvalid", true }, { "esil.breakoninvalid", true },
{ "dbg.trace_continue", true }, { "dbg.trace_continue", true },
{ "graph.offset", false } }; { "ag.offset", false } };
Configuration::Configuration() : QObject(), nativePalette(qApp->palette()) Configuration::Configuration() : QObject(), nativePalette(qApp->palette())
{ {

View File

@ -79,7 +79,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
ui->cmtcolSpinBox->setEnabled(cmtRightEnabled); ui->cmtcolSpinBox->setEnabled(cmtRightEnabled);
bool offsetsEnabled = bool offsetsEnabled =
Config()->getConfigBool("asm.offset") || Config()->getConfigBool("graph.offset"); Config()->getConfigBool("asm.offset") || Config()->getConfigBool("ag.offset");
ui->relOffsetLabel->setEnabled(offsetsEnabled); ui->relOffsetLabel->setEnabled(offsetsEnabled);
ui->relOffsetCheckBox->setEnabled(offsetsEnabled); ui->relOffsetCheckBox->setEnabled(offsetsEnabled);
ui->relOffFlagsCheckBox->setEnabled(Config()->getConfigBool("asm.offset") ui->relOffFlagsCheckBox->setEnabled(Config()->getConfigBool("asm.offset")
@ -288,8 +288,8 @@ void AsmOptionsWidget::asmComboBoxChanged(int index)
void AsmOptionsWidget::offsetCheckBoxToggled(bool checked) void AsmOptionsWidget::offsetCheckBoxToggled(bool checked)
{ {
ui->relOffsetLabel->setEnabled(checked || Config()->getConfigBool("graph.offset")); ui->relOffsetLabel->setEnabled(checked || Config()->getConfigBool("ag.offset"));
ui->relOffsetCheckBox->setEnabled(checked || Config()->getConfigBool("graph.offset")); ui->relOffsetCheckBox->setEnabled(checked || Config()->getConfigBool("ag.offset"));
ui->relOffFlagsCheckBox->setEnabled(checked && Config()->getConfigBool("asm.reloff")); ui->relOffFlagsCheckBox->setEnabled(checked && Config()->getConfigBool("asm.reloff"));
} }

View File

@ -42,7 +42,7 @@ GraphOptionsWidget::~GraphOptionsWidget() {}
void GraphOptionsWidget::updateOptionsFromVars() void GraphOptionsWidget::updateOptionsFromVars()
{ {
qhelpers::setCheckedWithoutSignals(ui->graphOffsetCheckBox, qhelpers::setCheckedWithoutSignals(ui->graphOffsetCheckBox,
Config()->getConfigBool("graph.offset")); Config()->getConfigBool("ag.offset"));
ui->maxColsSpinBox->blockSignals(true); ui->maxColsSpinBox->blockSignals(true);
ui->maxColsSpinBox->setValue(Config()->getGraphBlockMaxChars()); ui->maxColsSpinBox->setValue(Config()->getGraphBlockMaxChars());
ui->maxColsSpinBox->blockSignals(false); ui->maxColsSpinBox->blockSignals(false);
@ -80,8 +80,11 @@ void GraphOptionsWidget::on_minFontSizeSpinBox_valueChanged(int value)
void GraphOptionsWidget::on_graphOffsetCheckBox_toggled(bool checked) void GraphOptionsWidget::on_graphOffsetCheckBox_toggled(bool checked)
{ {
Config()->setConfig("graph.offset", checked); Config()->setConfig("ag.offset", checked);
emit Core()->asmOptionsChanged(); Config()->setConfig("asm.offset", checked);
//Config()->getConfigBool('')
//emit Core()->asmOptionsChanged();
Core()->triggerAsmOptionsChanged();
triggerOptionsChanged(); triggerOptionsChanged();
} }