Skip to content

Commit

Permalink
fix: Byte editing mode not exiting when clicking somewhere else
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jul 30, 2022
1 parent 45ea220 commit 1ed88f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/builtin/source/content/views/view_hex_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 1ed88f3

Please sign in to comment.