Use storage class to return document objects

This commit is contained in:
Veronica Berglyd Olsen
2022-11-06 00:29:43 +01:00
parent 76a1421fde
commit a75424e44b
14 changed files with 36 additions and 46 deletions
+1 -2
View File
@@ -36,7 +36,6 @@ from PyQt5.QtCore import QCoreApplication, QRegularExpression
from novelwriter.enum import nwItemLayout, nwItemType
from novelwriter.common import numberToRoman, checkInt
from novelwriter.constants import nwConst, nwRegEx, nwUnicode
from novelwriter.core.document import NWDoc
logger = logging.getLogger(__name__)
@@ -305,7 +304,7 @@ class Tokenizer(ABC):
return False
if theText is None:
theText = NWDoc(self.theProject, theHandle).readDocument() or ""
theText = self.theProject.storage.getDocument(theHandle).readDocument() or ""
self._theText = theText