diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp index 1d018b1c..9798473c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp @@ -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, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui index 7c1cfbc5..303fd7ad 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/UiFiles/HexViewerWidget.ui @@ -59,6 +59,13 @@ + + + false + + true