aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html3
-rw-r--r--qt/ScintillaEditBase/ScintillaEditBase.cpp14
2 files changed, 6 insertions, 11 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index b585396c9..01c9d44d6 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -600,6 +600,9 @@
On Qt, fix indicator drawing past left of text pane over margin.
<a href="https://sourceforge.net/p/scintilla/bugs/2373/">Bug #2373</a>.
</li>
+ <li>
+ On Qt, allow scrolling with mouse wheel when scroll bar hidden.
+ </li>
</ul>
<h3>
<a href="https://www.scintilla.org/scintilla532.zip">Release 5.3.2</a>
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);
}
}
}