From 1253d682565edbc5fb3ab20fbab972c24646b154 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 8 Dec 2025 21:10:49 +0100 Subject: [PATCH] fix: Reset selected row after checking it (cherry picked from commit ab0fb3131df60685bc3f2f366ff47b2426bd6b05) --- .../builtin/source/content/views/view_data_inspector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/builtin/source/content/views/view_data_inspector.cpp b/plugins/builtin/source/content/views/view_data_inspector.cpp index 7822e00fc..f01ea608f 100644 --- a/plugins/builtin/source/content/views/view_data_inspector.cpp +++ b/plugins/builtin/source/content/views/view_data_inspector.cpp @@ -433,10 +433,6 @@ namespace hex::plugin::builtin { ImGui::SameLine(); - if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { - m_selectedEntryName.reset(); - } - // Handle copying the value to the clipboard when clicking the row if (ImGui::Selectable("##InspectorLine", m_selectedEntryName == entry.unlocalizedName, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap)) { m_selectedEntryName = entry.unlocalizedName; @@ -445,6 +441,10 @@ namespace hex::plugin::builtin { } } + if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { + m_selectedEntryName.reset(); + } + // Enter editing mode when double-clicking the row const bool editable = entry.editingFunction.has_value() && m_selectedProvider->isWritable(); if (ImGui::IsItemHovered()) {