From 4e22d636d39b14d8ac5f0ae662f4a9aba4bf6d9f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 24 Dec 2022 15:29:42 +0100 Subject: [PATCH] fix: Yet another hex editor scrolling issue --- plugins/builtin/source/ui/hex_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/ui/hex_editor.cpp b/plugins/builtin/source/ui/hex_editor.cpp index e040fcb77..4649ad914 100644 --- a/plugins/builtin/source/ui/hex_editor.cpp +++ b/plugins/builtin/source/ui/hex_editor.cpp @@ -617,7 +617,7 @@ namespace hex::plugin::builtin::ui { // Scroll to the cursor if it's either at the top or bottom edge of the screen if (this->m_shouldScrollToSelection && isSelectionValid()) { // Make sure simply clicking on a byte at the edge of the screen won't cause scrolling - if ((ImGui::IsMouseDown(ImGuiMouseButton_Left) && *this->m_selectionStart != *this->m_selectionEnd)) { + if ((ImGui::IsMouseDragging(ImGuiMouseButton_Left) && *this->m_selectionStart != *this->m_selectionEnd)) { auto fractionPerLine = 1.0 / (this->m_visibleRowCount + 1); if (y == (u64(clipper.DisplayStart) + 3)) {