mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 22:39:02 +08:00
Machine actions are now when selected (instead of active) machine change
CURA-1385
This commit is contained in:
parent
b14ae94190
commit
0b02a5f12b
@ -286,7 +286,6 @@ class MachineManagerModel(QObject):
|
||||
self.setActiveQuality(new_container_id)
|
||||
self.updateQualityContainerFromUserContainer()
|
||||
|
||||
|
||||
@pyqtSlot(str, result=str)
|
||||
def duplicateContainer(self, container_id):
|
||||
if not self._active_container_stack:
|
||||
@ -357,7 +356,6 @@ class MachineManagerModel(QObject):
|
||||
self.setActiveQuality(containers[0].getId())
|
||||
self.activeQualityChanged.emit()
|
||||
|
||||
|
||||
@pyqtSlot()
|
||||
def updateQualityContainerFromUserContainer(self):
|
||||
if not self._active_container_stack:
|
||||
@ -496,6 +494,12 @@ class MachineManagerModel(QObject):
|
||||
|
||||
return False
|
||||
|
||||
@pyqtSlot(str, result = str)
|
||||
def getDefinitionByMachineId(self, machine_id):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id=machine_id)
|
||||
if containers:
|
||||
return containers[0].getBottom().getId()
|
||||
|
||||
def _updateVariantContainer(self, definition):
|
||||
if not definition.getMetaDataEntry("has_variants"):
|
||||
return self._empty_variant_container
|
||||
|
@ -46,7 +46,7 @@ UM.ManagementPage
|
||||
Repeater
|
||||
{
|
||||
id: machineActionRepeater
|
||||
model: Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.activeDefinitionId)
|
||||
model: Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id))
|
||||
|
||||
Button
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user