mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Fix error when no machine is active
This commit is contained in:
parent
bf1cfe9e7e
commit
54d07ae29b
1 changed files with 6 additions and 1 deletions
|
@ -130,7 +130,12 @@ class PrintInformation(QObject):
|
||||||
## Created an acronymn-like abbreviated machine name from the currently active machine name
|
## Created an acronymn-like abbreviated machine name from the currently active machine name
|
||||||
# Called each time the global stack is switched
|
# Called each time the global stack is switched
|
||||||
def _setAbbreviatedMachineName(self):
|
def _setAbbreviatedMachineName(self):
|
||||||
global_stack_name = Application.getInstance().getGlobalContainerStack().getName()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
if not global_container_stack:
|
||||||
|
self._abbr_machine = ""
|
||||||
|
return
|
||||||
|
|
||||||
|
global_stack_name = global_container_stack.getName()
|
||||||
split_name = global_stack_name.split(" ")
|
split_name = global_stack_name.split(" ")
|
||||||
abbr_machine = ""
|
abbr_machine = ""
|
||||||
for word in split_name:
|
for word in split_name:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue