From 1ed88f3910cb2cd23a80cf43f036acdef63488fa Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 30 Jul 2022 23:01:25 +0200 Subject: [PATCH] fix: Byte editing mode not exiting when clicking somewhere else Fixes #607 --- plugins/builtin/source/content/views/view_hex_editor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/builtin/source/content/views/view_hex_editor.cpp b/plugins/builtin/source/content/views/view_hex_editor.cpp index 229c30a6e..a673b413a 100644 --- a/plugins/builtin/source/content/views/view_hex_editor.cpp +++ b/plugins/builtin/source/content/views/view_hex_editor.cpp @@ -533,6 +533,11 @@ namespace hex::plugin::builtin { ImGui::SetKeyboardFocusHere(); ImGui::CaptureKeyboardFromApp(true); + if (ImGui::IsMouseClicked(ImGuiMouseButton_Left)) { + this->m_editingAddress = std::nullopt; + this->m_shouldModifyValue = false; + } + if (this->m_currDataVisualizer->drawEditing(*this->m_editingAddress, this->m_editingBytes.data(), this->m_editingBytes.size(), this->m_upperCaseHex, this->m_enteredEditingMode) || this->m_shouldModifyValue) { provider->write(*this->m_editingAddress, this->m_editingBytes.data(), this->m_editingBytes.size());