mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Now empty message in materials and variants doesn't appear - CURA-4377
This commit is contained in:
parent
437da52f65
commit
4d9908364a
2 changed files with 7 additions and 1 deletions
|
@ -354,11 +354,16 @@ class MachineManager(QObject):
|
||||||
if containers:
|
if containers:
|
||||||
Application.getInstance().setGlobalContainerStack(containers[0])
|
Application.getInstance().setGlobalContainerStack(containers[0])
|
||||||
|
|
||||||
|
self.activeQualityChanged.emit()
|
||||||
|
self.activeVariantChanged.emit()
|
||||||
|
self.activeMaterialChanged.emit()
|
||||||
|
|
||||||
@pyqtSlot(str, str)
|
@pyqtSlot(str, str)
|
||||||
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:
|
||||||
Application.getInstance().setGlobalContainerStack(new_stack)
|
# Instead of setting the global container stack here, we set the active machine and so the signals are emitted
|
||||||
|
self.setActiveMachine(new_stack.getId())
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Failed creating a new machine!")
|
Logger.log("w", "Failed creating a new machine!")
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ Item
|
||||||
target: Cura.MachineManager
|
target: Cura.MachineManager
|
||||||
onActiveQualityChanged: qualityModel.update()
|
onActiveQualityChanged: qualityModel.update()
|
||||||
onActiveMaterialChanged: qualityModel.update()
|
onActiveMaterialChanged: qualityModel.update()
|
||||||
|
onActiveVariantChanged: qualityModel.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
ListModel
|
ListModel
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue