Corrected bug with HexViewerItem::allocatedGraphicsItem being cleared unexpectedly upon graphic item allocation in the hex viewer

This commit is contained in:
Nav
2023-04-30 17:19:30 +01:00
parent f6d863c8f2
commit 00f3d2265e

View File

@@ -38,6 +38,10 @@ namespace Bloom::Widgets
return; return;
} }
if (this->hexViewerItem->allocatedGraphicsItem != nullptr) {
this->hexViewerItem->allocatedGraphicsItem->setHexViewerItem(nullptr);
}
this->hexViewerItem->allocatedGraphicsItem = this; this->hexViewerItem->allocatedGraphicsItem = this;
this->setPos(this->hexViewerItem->position()); this->setPos(this->hexViewerItem->position());
this->setVisible(true); this->setVisible(true);