mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:19:04 +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.setActiveQuality(new_container_id)
|
||||||
self.updateQualityContainerFromUserContainer()
|
self.updateQualityContainerFromUserContainer()
|
||||||
|
|
||||||
|
|
||||||
@pyqtSlot(str, result=str)
|
@pyqtSlot(str, result=str)
|
||||||
def duplicateContainer(self, container_id):
|
def duplicateContainer(self, container_id):
|
||||||
if not self._active_container_stack:
|
if not self._active_container_stack:
|
||||||
@ -357,7 +356,6 @@ class MachineManagerModel(QObject):
|
|||||||
self.setActiveQuality(containers[0].getId())
|
self.setActiveQuality(containers[0].getId())
|
||||||
self.activeQualityChanged.emit()
|
self.activeQualityChanged.emit()
|
||||||
|
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def updateQualityContainerFromUserContainer(self):
|
def updateQualityContainerFromUserContainer(self):
|
||||||
if not self._active_container_stack:
|
if not self._active_container_stack:
|
||||||
@ -496,6 +494,12 @@ class MachineManagerModel(QObject):
|
|||||||
|
|
||||||
return False
|
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):
|
def _updateVariantContainer(self, definition):
|
||||||
if not definition.getMetaDataEntry("has_variants"):
|
if not definition.getMetaDataEntry("has_variants"):
|
||||||
return self._empty_variant_container
|
return self._empty_variant_container
|
||||||
|
@ -46,7 +46,7 @@ UM.ManagementPage
|
|||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
id: machineActionRepeater
|
id: machineActionRepeater
|
||||||
model: Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.activeDefinitionId)
|
model: Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id))
|
||||||
|
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user