Improve how the novel tree is refreshed

This commit is contained in:
Veronica Berglyd Olsen
2022-11-14 18:45:36 +01:00
parent 992ed4f36c
commit ebc6654069
7 changed files with 76 additions and 135 deletions
+2 -2
View File
@@ -118,10 +118,10 @@ def testGuiEditor_LoadText(qtbot, monkeypatch, caplog, nwGUI, projPath, ipsumTex
assert nwGUI.docEditor.loadText(C.hSceneDoc) is True
assert nwGUI.docEditor._bigDoc is True
# Regular open, with line number
# Regular open, with line number (1 indexed)
assert nwGUI.docEditor.loadText(C.hSceneDoc, tLine=4) is True
cursPos = nwGUI.docEditor.getCursorPosition()
assert nwGUI.docEditor.document().findBlock(cursPos).blockNumber() == 4
assert nwGUI.docEditor.document().findBlock(cursPos).blockNumber() == 3
# Load empty document
nwGUI.docEditor.replaceText("")
-1
View File
@@ -57,7 +57,6 @@ def testGuiMain_ProjectBlocker(nwGUI):
assert nwGUI.importDocument() is False
assert nwGUI.openSelectedItem() is False
assert nwGUI.editItemLabel() is False
assert nwGUI.requestNovelTreeRefresh() is False
assert nwGUI.rebuildIndex() is False
assert nwGUI.showProjectSettingsDialog() is False
assert nwGUI.showProjectDetailsDialog() is False