Added some fixes for bugs discovered when testing with PySide2

This commit is contained in:
Veronica K. B. Olsen
2020-02-15 17:59:40 +01:00
parent 872fc87ab8
commit ca18fe5461
5 changed files with 12 additions and 21 deletions
+7 -12
View File
@@ -17,7 +17,7 @@ import nw
from os import path
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtGui import QIcon, QPixmap, QColor
from PyQt5.QtGui import QIcon, QPixmap, QColor, QKeySequence
from PyQt5.QtWidgets import (
qApp, QMainWindow, QVBoxLayout, QFrame, QSplitter, QFileDialog, QShortcut,
QMessageBox, QProgressDialog, QDialog
@@ -152,17 +152,12 @@ class GuiMain(QMainWindow):
# Shortcuts and Actions
self._connectMenuActions()
QShortcut(
Qt.Key_Return,
self.treeView,
context=Qt.WidgetShortcut,
activated=self._treeKeyPressReturn
)
QShortcut(
Qt.Key_Escape,
self,
activated=self._keyPressEscape
)
keyReturn = QShortcut(self.treeView)
keyReturn.setKey(QKeySequence(Qt.Key_Return))
keyReturn.activated.connect(self._treeKeyPressReturn)
keyEscape = QShortcut(self)
keyEscape.setKey(QKeySequence(Qt.Key_Escape))
keyEscape.activated.connect(self._keyPressEscape)
# Forward Functions
self.setStatus = self.statusBar.setStatus