aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/ScintillaEditBase.cpp
diff options
context:
space:
mode:
authorMitchell Foral <unknown>2023-01-17 15:33:09 +1100
committerMitchell Foral <unknown>2023-01-17 15:33:09 +1100
commitc568c1a2ea16e9990c7352991c9d02bfa72302b1 (patch)
treedb9e1b061ed801d98a7296cd87c6d0e328088071 /qt/ScintillaEditBase/ScintillaEditBase.cpp
parentabfef700976bbf3a2843b498f4216f63164d8661 (diff)
downloadscintilla-mirror-c568c1a2ea16e9990c7352991c9d02bfa72302b1.tar.gz
Allow scrolling with mouse wheel when scroll bar hidden.
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaEditBase.cpp')
-rw-r--r--qt/ScintillaEditBase/ScintillaEditBase.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp
index 79eafd634..b58a118aa 100644
--- a/qt/ScintillaEditBase/ScintillaEditBase.cpp
+++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp
@@ -169,10 +169,7 @@ int wheelEventYDelta(QWheelEvent *event) {
void ScintillaEditBase::wheelEvent(QWheelEvent *event)
{
if (isWheelEventHorizontal(event)) {
- if (horizontalScrollBarPolicy() == Qt::ScrollBarAlwaysOff)
- event->ignore();
- else
- QAbstractScrollArea::wheelEvent(event);
+ QAbstractScrollArea::wheelEvent(event);
} else {
if (QApplication::keyboardModifiers() & Qt::ControlModifier) {
// Zoom! We play with the font sizes in the styles.
@@ -183,13 +180,8 @@ void ScintillaEditBase::wheelEvent(QWheelEvent *event)
sqt->KeyCommand(Message::ZoomOut);
}
} else {
- // Ignore wheel events when the scroll bars are disabled.
- if (verticalScrollBarPolicy() == Qt::ScrollBarAlwaysOff) {
- event->ignore();
- } else {
- // Scroll
- QAbstractScrollArea::wheelEvent(event);
- }
+ // Scroll
+ QAbstractScrollArea::wheelEvent(event);
}
}
}