Hide stack memory highlighting option for non RAM inspection panes

This commit is contained in:
Nav
2021-12-25 23:08:59 +00:00
parent 2c54457e0f
commit f47c1c6a60
2 changed files with 24 additions and 9 deletions

View File

@@ -77,19 +77,27 @@ HexViewerWidget::HexViewerWidget(
);
this->byteItemGraphicsScene = this->byteItemGraphicsView->getScene();
this->setStackMemoryHighlightingEnabled(this->settings.highlightStackMemory);
this->setHoveredRowAndColumnHighlightingEnabled(this->settings.highlightHoveredRowAndCol);
this->setFocusedMemoryHighlightingEnabled(this->settings.highlightFocusedMemory);
this->setAnnotationsEnabled(this->settings.displayAnnotations);
QObject::connect(
this->highlightStackMemoryButton,
&QToolButton::clicked,
this,
[this] {
this->setStackMemoryHighlightingEnabled(!this->settings.highlightStackMemory);
}
);
if (this->targetMemoryDescriptor.type == Targets::TargetMemoryType::RAM) {
this->highlightStackMemoryButton->show();
this->setStackMemoryHighlightingEnabled(this->settings.highlightStackMemory);
QObject::connect(
this->highlightStackMemoryButton,
&QToolButton::clicked,
this,
[this] {
this->setStackMemoryHighlightingEnabled(!this->settings.highlightStackMemory);
}
);
} else {
this->highlightStackMemoryButton->hide();
this->setStackMemoryHighlightingEnabled(false);
}
QObject::connect(
this->highlightHoveredRowAndColumnButton,

View File

@@ -59,6 +59,13 @@
</item>
<item>
<widget class="SvgToolButton" name="highlight-stack-memory-btn">
<!--
This button is hidden by default. Only to be displayed for the RAM inspection pane.
-->
<property name="visible">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>