- fixed issue with trying to access GUI from different threads by adding a new signal for printing to shell messages
This commit is contained in:
11
app_Main.py
11
app_Main.py
@@ -203,9 +203,10 @@ class App(QtCore.QObject):
|
||||
# ###############################################################################################################
|
||||
|
||||
# Inform the user
|
||||
# Handled by:
|
||||
# * App.info() --> Print on the status bar
|
||||
# Handled by: App.info() --> Print on the status bar
|
||||
inform = QtCore.pyqtSignal([str], [str, bool])
|
||||
# Handled by: App.info_shell() --> Print on the shell
|
||||
inform_shell = QtCore.pyqtSignal(str)
|
||||
|
||||
app_quit = QtCore.pyqtSignal()
|
||||
|
||||
@@ -762,6 +763,9 @@ class App(QtCore.QObject):
|
||||
self.inform[str].connect(self.info)
|
||||
self.inform[str, bool].connect(self.info)
|
||||
|
||||
# signal for displaying messages in the shell
|
||||
self.inform_shell.connect(self.info_shell)
|
||||
|
||||
# signal to be called when the app is quiting
|
||||
self.app_quit.connect(self.quit_application, type=Qt.QueuedConnection)
|
||||
self.message.connect(lambda: message_dialog(parent=self.ui))
|
||||
@@ -2428,6 +2432,9 @@ class App(QtCore.QObject):
|
||||
if msg != '' and shell_echo is True:
|
||||
self.shell_message(msg)
|
||||
|
||||
def info_shell(self, msg):
|
||||
self.shell_message(msg=msg)
|
||||
|
||||
def on_import_preferences(self):
|
||||
"""
|
||||
Loads the application default settings from a saved file into
|
||||
|
||||
Reference in New Issue
Block a user