From 405a16d982dc70dc6f97ab8e52a3424c61d051eb Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 29 Feb 2024 02:01:41 +0100 Subject: [PATCH] ImGui: fix regression in logger after improving cursor selections If you triple click a line in the logger, the selection mode will be set to SelectionMode::Line, however, when we drag with the mouse, the selection remain on SelectionMode::Line, causing the cursor to be stuck, which breaks the ability to scroll select. Mode must be set to normal during dragging. --- r5dev/thirdparty/imgui/misc/imgui_logger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r5dev/thirdparty/imgui/misc/imgui_logger.cpp b/r5dev/thirdparty/imgui/misc/imgui_logger.cpp index bd0ddaf1..0212c68f 100644 --- a/r5dev/thirdparty/imgui/misc/imgui_logger.cpp +++ b/r5dev/thirdparty/imgui/misc/imgui_logger.cpp @@ -736,7 +736,9 @@ void CTextLogger::HandleMouseInputs(bool bHoveredScrollbar, bool bActiveScrollba // Mouse left button dragging (=> update selection) else if (ImGui::IsMouseDragging(0) && ImGui::IsMouseDown(0)) { + m_SelectionMode = SelectionMode::Normal; io.WantCaptureMouse = true; + m_State.m_CursorPosition = m_InteractiveEnd = ScreenPosToCoordinates(ImGui::GetMousePos()); SetSelection(m_InteractiveStart, m_InteractiveEnd, m_SelectionMode);