Force a max width of extra column in novel view (#1238)
This commit is contained in:
@@ -144,11 +144,11 @@ def testGuiNovelTree_TreeItems(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
|
||||
assert novelTree.lastColType == NovelTreeColumn.HIDDEN
|
||||
assert novelTree._getLastColumnText(C.hSceneDoc, "T0001") == ("", "")
|
||||
|
||||
novelBar.setLastColType(NovelTreeColumn.POV)
|
||||
novelBar.setLastColType(NovelTreeColumn.PLOT)
|
||||
assert novelTree.isColumnHidden(novelTree.C_EXTRA) is False
|
||||
assert novelTree.lastColType == NovelTreeColumn.POV
|
||||
assert novelTree.lastColType == NovelTreeColumn.PLOT
|
||||
assert novelTree._getLastColumnText(C.hSceneDoc, "T0001") == (
|
||||
"Jane", "Point of View: Jane"
|
||||
"", ""
|
||||
)
|
||||
|
||||
novelBar.setLastColType(NovelTreeColumn.FOCUS)
|
||||
@@ -158,16 +158,20 @@ def testGuiNovelTree_TreeItems(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
|
||||
"Jane", "Focus: Jane"
|
||||
)
|
||||
|
||||
novelBar.setLastColType(NovelTreeColumn.PLOT)
|
||||
novelBar.setLastColType(NovelTreeColumn.POV)
|
||||
assert novelTree.isColumnHidden(novelTree.C_EXTRA) is False
|
||||
assert novelTree.lastColType == NovelTreeColumn.PLOT
|
||||
assert novelTree.lastColType == NovelTreeColumn.POV
|
||||
assert novelTree._getLastColumnText(C.hSceneDoc, "T0001") == (
|
||||
"", "Plot: "
|
||||
"Jane", "Point of View: Jane"
|
||||
)
|
||||
|
||||
novelTree._lastCol = None
|
||||
assert novelTree._getLastColumnText("0000000000000", "T0000") == ("", "")
|
||||
|
||||
# This forces the resizeEvent function to process labels
|
||||
spSize = nwGUI.splitMain.sizes()
|
||||
nwGUI.splitMain.setSizes([spSize[0] + 10, spSize[1] - 10])
|
||||
|
||||
# Item Meta
|
||||
# =========
|
||||
|
||||
|
||||
Reference in New Issue
Block a user