Add a shortcut to open project tree context menu

This commit is contained in:
Veronica Berglyd Olsen
2022-06-11 18:40:21 +02:00
parent 946656f8c5
commit 8d427f40c6
3 changed files with 21 additions and 5 deletions
+6
View File
@@ -511,6 +511,12 @@ def testGuiProjTree_ContextMenu(qtbot, caplog, monkeypatch, nwGUI, fncDir, mockR
assert projTree._openContextMenu(itemPos(hCharRoot)) is True
assert projTree._openContextMenu(itemPos(hCharNote)) is True
# Check the keyboard shortcut handler as well
projTree.setSelectedHandle(hNovelRoot)
assert projTree.openContextOnSelected() is True
projTree.clearSelection()
assert projTree.openContextOnSelected() is False
# Direct Edit Functions
# =====================
# Trigger the dedicated functions the menu entries connect to