From 16b02caf7af4ea34f5b9c81e2f7794e8beae0384 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 29 Jan 2026 19:54:36 +0100 Subject: [PATCH] fix: Clicking on data inspector row clearing data inspector window if required size is zero --- plugins/builtin/source/content/views/view_data_inspector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/views/view_data_inspector.cpp b/plugins/builtin/source/content/views/view_data_inspector.cpp index 9c456a132..54d714279 100644 --- a/plugins/builtin/source/content/views/view_data_inspector.cpp +++ b/plugins/builtin/source/content/views/view_data_inspector.cpp @@ -460,7 +460,7 @@ namespace hex::plugin::builtin { // Handle copying the value to the clipboard when clicking the row if (ImGui::Selectable("##InspectorLine", m_selectedEntryName == entry.unlocalizedName, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap | ImGuiSelectableFlags_AllowDoubleClick)) { m_selectedEntryName = entry.unlocalizedName; - if (auto selection = ImHexApi::HexEditor::getSelection(); selection.has_value()) { + if (auto selection = ImHexApi::HexEditor::getSelection(); selection.has_value() && entry.requiredSize > 0) { ImHexApi::HexEditor::setSelection(Region { .address=selection->getStartAddress(), .size=entry.requiredSize }); } }