fix: Reset selected row after checking it

(cherry picked from commit ab0fb3131d)
This commit is contained in:
WerWolv 2025-12-08 21:10:49 +01:00
parent c944750f4d
commit 1253d68256
1 changed files with 4 additions and 4 deletions

View File

@ -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()) {