diff --git a/novelwriter/gui/outline.py b/novelwriter/gui/outline.py index f6f808c4..220772dc 100644 --- a/novelwriter/gui/outline.py +++ b/novelwriter/gui/outline.py @@ -473,8 +473,10 @@ class GuiOutlineTree(QTreeWidget): return - def refreshTree(self, rootHandle: str | None = None, - overRide: bool = False, novelChanged: bool = False) -> None: + def refreshTree( + self, rootHandle: str | None = None, + overRide: bool = False, novelChanged: bool = False + ) -> None: """Called whenever the Outline tab is activated and controls what data to load, and if necessary, force a rebuild of the tree. diff --git a/tests/test_gui/test_gui_outline.py b/tests/test_gui/test_gui_outline.py index dabd9cf0..be762fc5 100644 --- a/tests/test_gui/test_gui_outline.py +++ b/tests/test_gui/test_gui_outline.py @@ -166,12 +166,12 @@ def testGuiOutline_Main(qtbot, monkeypatch, nwGUI, projPath): # Current Order order = [outlineTree._colIdx[col] for col in outlineTree._treeOrder] - assert order == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] + assert order == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] # Move 3 to 0 outlineTree._columnMoved(0, 3, 0) order = [outlineTree._colIdx[col] for col in outlineTree._treeOrder] - assert order == [3, 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] + assert order == [3, 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] # qtbot.stop()