From d978267c3e4d9cebb34f02c78ee44b7651ed4fee Mon Sep 17 00:00:00 2001 From: elasota Date: Fri, 3 Jul 2020 17:39:26 -0400 Subject: [PATCH] Remove selection scroll timer (which doesn't work anyway) --- PortabilityLayer/PLEditboxWidget.cpp | 8 +------- PortabilityLayer/PLEditboxWidget.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/PortabilityLayer/PLEditboxWidget.cpp b/PortabilityLayer/PLEditboxWidget.cpp index a69d75a..127ccc5 100644 --- a/PortabilityLayer/PLEditboxWidget.cpp +++ b/PortabilityLayer/PLEditboxWidget.cpp @@ -31,7 +31,6 @@ namespace PortabilityLayer , m_caratScrollLocked(false) , m_hasFocus(false) , m_caratTimer(0) - , m_selectionScrollTimer(0) , m_isMultiLine(false) , m_isDraggingSelection(false) , m_dragSelectionStartChar(false) @@ -273,7 +272,6 @@ namespace PortabilityLayer { m_window->FocusWidget(this); m_isDraggingSelection = true; - m_selectionScrollTimer = kMouseScrollRate; return HandleDragSelection(evt); } else @@ -335,9 +333,6 @@ namespace PortabilityLayer Redraw(); } } - - if (m_isDraggingSelection) - m_selectionScrollTimer++; } void EditboxWidget::HandleCharacter(uint8_t ch, const uint32_t numRepeatsRequested) @@ -762,8 +757,7 @@ namespace PortabilityLayer m_selStartChar = m_dragSelectionStartChar; } - if (m_selectionScrollTimer >= kMouseScrollRate) - AdjustScrollToCarat(); + AdjustScrollToCarat(); m_caratTimer = 0; Redraw(); diff --git a/PortabilityLayer/PLEditboxWidget.h b/PortabilityLayer/PLEditboxWidget.h index aafc878..9f95054 100644 --- a/PortabilityLayer/PLEditboxWidget.h +++ b/PortabilityLayer/PLEditboxWidget.h @@ -92,6 +92,5 @@ namespace PortabilityLayer size_t m_dragSelectionStartChar; uint16_t m_caratTimer; - uint16_t m_selectionScrollTimer; }; }