Merge branch 'master' into project_outline

This commit is contained in:
Veronica K. B. Olsen
2019-11-21 15:31:43 +01:00
6 changed files with 296 additions and 100 deletions
+12
View File
@@ -469,6 +469,18 @@ class GuiMain(QMainWindow):
return True
def passDocumentAction(self, theAction):
"""Pass on document action theAction to whatever document has
the focus. If no document has focus, the action is discarded.
"""
if self.docEditor.hasFocus():
self.docEditor.docAction(theAction)
elif self.docViewer.hasFocus():
self.docViewer.docAction(theAction)
else:
logger.debug("Document action requested, but no document has focus")
return True
##
# Tree Item Actions
##