Update item change signals

This commit is contained in:
Veronica Berglyd Olsen
2024-11-22 00:15:12 +01:00
parent e0b27317f3
commit ffe6cd0a65
11 changed files with 90 additions and 64 deletions
+4 -4
View File
@@ -43,7 +43,7 @@ from PyQt5.QtWidgets import (
from novelwriter import CONFIG, SHARED
from novelwriter.common import decodeMimeHandles, qtLambda
from novelwriter.constants import nwConst, nwStyles, nwUnicode
from novelwriter.enum import nwDocAction, nwDocMode, nwItemType
from novelwriter.enum import nwChange, nwDocAction, nwDocMode, nwItemType
from novelwriter.error import logException
from novelwriter.extensions.configlayout import NColourLabel
from novelwriter.extensions.eventfilters import WheelEventFilter
@@ -346,10 +346,10 @@ class GuiDocViewer(QTextBrowser):
# Public Slots
##
@pyqtSlot(str)
def updateDocInfo(self, tHandle: str) -> None:
@pyqtSlot(str, Enum)
def onProjectItemChanged(self, tHandle: str, change: nwChange) -> None:
"""Update the header title bar if needed."""
if tHandle and tHandle == self._docHandle:
if tHandle == self._docHandle and change == nwChange.UPDATE:
self.docHeader.setHandle(tHandle)
self.updateDocMargins()
return