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
@@ -33,7 +33,6 @@ from PyQt5.QtWidgets import (
QListWidgetItem, QDialogButtonBox, QLabel, QGridLayout
)
from novelwriter.core import NWDoc
from novelwriter.custom import QHelpLabel, QSwitch
logger = logging.getLogger(__name__)
@@ -204,7 +203,7 @@ class GuiDocSplit(QDialog):
spLevel = self.splitLevel.currentData()
if not self._text:
inDoc = NWDoc(self.theProject, sHandle)
inDoc = self.theProject.storage.getDocument(sHandle)
self._text = (inDoc.readDocument() or "").splitlines()
for lineNo, aLine in enumerate(self._text):