mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Add loading hint for replacing the global stack
Displayed as a splash message when the application is starting, logged (not displayed to the user) otherwise CURA-6823
This commit is contained in:
parent
81976cfd1a
commit
6a0fba060e
1 changed files with 9 additions and 0 deletions
|
@ -637,6 +637,7 @@ class CuraApplication(QtApplication):
|
|||
|
||||
@override(Application)
|
||||
def setGlobalContainerStack(self, stack: "GlobalStack") -> None:
|
||||
self._setLoadingHint("Preparing Active Machine...")
|
||||
super().setGlobalContainerStack(stack)
|
||||
|
||||
## A reusable dialogbox
|
||||
|
@ -741,6 +742,14 @@ class CuraApplication(QtApplication):
|
|||
|
||||
self._plugins_loaded = True
|
||||
|
||||
## Set a short, user-friendly hint about current loading status.
|
||||
# The way this message is displayed depends on application state
|
||||
def _setLoadingHint(self, hint: str):
|
||||
if self.started:
|
||||
Logger.info(hint)
|
||||
else:
|
||||
self.showSplashMessage(hint)
|
||||
|
||||
def run(self):
|
||||
super().run()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue