mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Only set global stack in addMachine() if there was none
This commit is contained in:
parent
f5342fcd20
commit
5706a540d9
1 changed files with 3 additions and 1 deletions
|
@ -343,6 +343,8 @@ class MachineManager(QObject):
|
||||||
def addMachine(self, name: str, definition_id: str) -> None:
|
def addMachine(self, name: str, definition_id: str) -> None:
|
||||||
new_stack = CuraStackBuilder.createMachine(name, definition_id)
|
new_stack = CuraStackBuilder.createMachine(name, definition_id)
|
||||||
if new_stack:
|
if new_stack:
|
||||||
|
# only set the global container stack if there was none
|
||||||
|
if self._global_container_stack is None:
|
||||||
Application.getInstance().setGlobalContainerStack(new_stack)
|
Application.getInstance().setGlobalContainerStack(new_stack)
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Failed creating a new machine!")
|
Logger.log("w", "Failed creating a new machine!")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue