Merge branch 'main' into testing

This commit is contained in:
Veronica K. B. Olsen
2021-03-17 17:25:00 +01:00
6 changed files with 197 additions and 168 deletions
+8 -4
View File
@@ -766,14 +766,18 @@ class GuiMain(QMainWindow):
return True
def passDocumentAction(self, theAction):
"""Pass on document action theAction to the document viewer if
it has focus, otherwise pass it to the document editor.
"""Pass on document action to the document viewer if it has
focus, or pass it to the document editor if it or any of
its clid widgets have focus. If neither has focus, ignore the
action.
"""
if self.docViewer.hasFocus():
self.docViewer.docAction(theAction)
else:
elif self.docEditor.hasFocus():
self.docEditor.docAction(theAction)
return True
else:
logger.debug("Action cancelled as neither editor nor viewer has focus")
return
##
# Tree Item Actions