mirror of https://github.com/WerWolv/ImHex
impr: Allow Esc to clear editing and selected state in data inspector
(cherry picked from commit 77b9e3eac8)
This commit is contained in:
parent
59afa06bf4
commit
d8e54e535b
|
|
@ -433,6 +433,10 @@ 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;
|
||||
|
|
@ -469,6 +473,10 @@ namespace hex::plugin::builtin {
|
|||
return;
|
||||
}
|
||||
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
entry.editing = false;
|
||||
}
|
||||
|
||||
// Handle editing mode
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
|
||||
ImGui::SetNextItemWidth(-1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue