From 00f3d2265ef87943cfc6bc225197c972db06b4fe Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 30 Apr 2023 17:19:30 +0100 Subject: [PATCH] Corrected bug with HexViewerItem::allocatedGraphicsItem being cleared unexpectedly upon graphic item allocation in the hex viewer --- .../HexViewerWidget/GraphicsItem.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/GraphicsItem.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/GraphicsItem.hpp index 11d7bc80..91061676 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/GraphicsItem.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/GraphicsItem.hpp @@ -38,6 +38,10 @@ namespace Bloom::Widgets return; } + if (this->hexViewerItem->allocatedGraphicsItem != nullptr) { + this->hexViewerItem->allocatedGraphicsItem->setHexViewerItem(nullptr); + } + this->hexViewerItem->allocatedGraphicsItem = this; this->setPos(this->hexViewerItem->position()); this->setVisible(true);