Forward all scroll events in editor/viewer areas to their text area widgets (#1425)

This commit is contained in:
Veronica Berglyd Olsen
2023-08-31 11:40:52 +02:00
parent 190848ad2e
commit 94329b334a
3 changed files with 75 additions and 0 deletions
+5
View File
@@ -55,6 +55,7 @@ from novelwriter.common import minmax, transferCase
from novelwriter.constants import nwConst, nwKeyWords, nwUnicode
from novelwriter.core.index import countWords
from novelwriter.gui.dochighlight import GuiDocHighlighter
from novelwriter.extensions.wheeleventfilter import WheelEventFilter
if TYPE_CHECKING: # pragma: no cover
from novelwriter.guimain import GuiMain
@@ -178,6 +179,10 @@ class GuiDocEditor(QTextEdit):
self.wCounterSel.setAutoDelete(False)
self.wCounterSel.signals.countsReady.connect(self._updateSelCounts)
# Install Event Filter for Mouse Wheel
self.wheelEventForwarder = WheelEventFilter(self)
self.installEventFilter(self.wheelEventForwarder)
# Finalise
self.updateSyntaxColours()
self.initEditor()