diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp index 490c0b45..2058ef84 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp @@ -166,7 +166,10 @@ void ByteItemGraphicsScene::adjustSize(bool forced) { if (!this->byteItemsByAddress.empty()) { this->adjustByteItemPositions(); - this->adjustAnnotationItemPositions(); + + if (this->settings.displayAnnotations) { + this->adjustAnnotationItemPositions(); + } const auto* lastByteItem = (--this->byteItemsByAddress.end())->second; const auto sceneHeight = static_cast( @@ -293,7 +296,7 @@ void ByteItemGraphicsScene::adjustByteItemPositions() { ); // We only display annotations that span a single row. - if (firstByteRowIndex == lastByteRowIndex) { + if (this->settings.displayAnnotations && firstByteRowIndex == lastByteRowIndex) { annotationItem->show(); if (annotationItem->position == AnnotationItemPosition::TOP) { @@ -360,7 +363,7 @@ void ByteItemGraphicsScene::adjustByteItemPositions() { } void ByteItemGraphicsScene::adjustAnnotationItemPositions() { - if (this->byteItemsByAddress.empty()) { + if (this->byteItemsByAddress.empty() || !this->settings.displayAnnotations) { return; } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidgetSettings.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidgetSettings.hpp index bf9ec5f9..70ece87f 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidgetSettings.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidgetSettings.hpp @@ -8,5 +8,6 @@ namespace Bloom::Widgets bool highlightFocusedMemory = true; bool highlightHoveredRowAndCol = true; bool displayAsciiValues = false; + bool displayAnnotations = true; }; }