From dafac73e122c234bf84cd57e755903e73c24875c Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 4 Mar 2022 19:10:09 +0800 Subject: [PATCH] - fix: the scroll behavior of mouse dragging on the editor's edge is not correct --- NEWS.md | 3 ++- RedPandaIDE/qsynedit/SynEdit.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index f906468c..4390d193 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,7 +15,8 @@ Red Panda C++ Version 0.14.5 - enhancement: use the expression evaluation logic to handle "goto declaration"/"goto definition" - enhancement: reduce startup time by about 1 second. - enhancement: add option "mouse selection/drag scroll speed" in the options dialog's "Editor" / "general" tab. - - fix: scroll speed of mouse selection/drag is too fast + - fix: the scroll speed of mouse selection/drag is too fast. + - fix: the scroll behavior of mouse dragging on the editor's edge is not correct Red Panda C++ Version 0.14.4 - enhancement: git - log diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index f5eb870d..997577c4 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -2514,9 +2514,9 @@ void SynEdit::computeScroll(int X, int Y, bool isDragging) else mScrollDeltaX = 0; - if (isDragging && (X<0 || X>clientRect().width())) { - mScrollDeltaX = 0; - } +// if (isDragging && (X<0 || X>clientRect().width())) { +// mScrollDeltaX = 0; +// } if (Y < iScrollBounds.top()) mScrollDeltaY = (Y - iScrollBounds.top()) / mTextHeight - 1; @@ -2525,9 +2525,9 @@ void SynEdit::computeScroll(int X, int Y, bool isDragging) else mScrollDeltaY = 0; - if (isDragging && (Y<0 || Y>clientRect().height())) { - mScrollDeltaY = 0; - } +// if (isDragging && (Y<0 || Y>clientRect().height())) { +// mScrollDeltaY = 0; +// } // if (mScrollDeltaX!=0 || mScrollDeltaY!=0) { if (isDragging) {