Forward all scroll events in editor/viewer areas to their text area widgets (#1425)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user