No focus shift on open document from tree
This commit is contained in:
+6
-1
@@ -193,9 +193,11 @@ class GuiMain(QMainWindow):
|
|||||||
|
|
||||||
# Shortcuts and Actions
|
# Shortcuts and Actions
|
||||||
self._connectMenuActions()
|
self._connectMenuActions()
|
||||||
|
|
||||||
keyReturn = QShortcut(self.treeView)
|
keyReturn = QShortcut(self.treeView)
|
||||||
keyReturn.setKey(QKeySequence(Qt.Key_Return))
|
keyReturn.setKey(QKeySequence(Qt.Key_Return))
|
||||||
keyReturn.activated.connect(self._treeKeyPressReturn)
|
keyReturn.activated.connect(self._treeKeyPressReturn)
|
||||||
|
|
||||||
keyEscape = QShortcut(self)
|
keyEscape = QShortcut(self)
|
||||||
keyEscape.setKey(QKeySequence(Qt.Key_Escape))
|
keyEscape.setKey(QKeySequence(Qt.Key_Escape))
|
||||||
keyEscape.activated.connect(self._keyPressEscape)
|
keyEscape.activated.connect(self._keyPressEscape)
|
||||||
@@ -1014,6 +1016,9 @@ class GuiMain(QMainWindow):
|
|||||||
##
|
##
|
||||||
|
|
||||||
def _treeSingleClick(self):
|
def _treeSingleClick(self):
|
||||||
|
"""Single click on a project tree item just updates the details
|
||||||
|
panel below the tree.
|
||||||
|
"""
|
||||||
sHandle = self.treeView.getSelectedHandle()
|
sHandle = self.treeView.getSelectedHandle()
|
||||||
if sHandle is not None:
|
if sHandle is not None:
|
||||||
self.treeMeta.updateViewBox(sHandle)
|
self.treeMeta.updateViewBox(sHandle)
|
||||||
@@ -1029,7 +1034,7 @@ class GuiMain(QMainWindow):
|
|||||||
if nwItem is not None:
|
if nwItem is not None:
|
||||||
if nwItem.itemType == nwItemType.FILE:
|
if nwItem.itemType == nwItemType.FILE:
|
||||||
logger.verbose("Requested item %s is a file" % tHandle)
|
logger.verbose("Requested item %s is a file" % tHandle)
|
||||||
self.openDocument(tHandle)
|
self.openDocument(tHandle, changeFocus=False)
|
||||||
else:
|
else:
|
||||||
logger.verbose("Requested item %s is a folder" % tHandle)
|
logger.verbose("Requested item %s is a folder" % tHandle)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user