mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
WIP: Cleanup MachineManager
This commit is contained in:
parent
0c3ac090c9
commit
5bb6efcb3e
2 changed files with 1 additions and 16 deletions
|
|
@ -586,14 +586,6 @@ class MachineManager(QObject):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@pyqtProperty(str, notify = activeQualityChanged)
|
|
||||||
def activeQualityChangesId(self) -> str:
|
|
||||||
if self._active_container_stack:
|
|
||||||
quality_changes = self._active_container_stack.qualityChanges
|
|
||||||
if quality_changes and not isinstance(quality_changes, type(self._empty_quality_changes_container)):
|
|
||||||
return quality_changes.getId()
|
|
||||||
return ""
|
|
||||||
|
|
||||||
## Check if a container is read_only
|
## Check if a container is read_only
|
||||||
@pyqtSlot(str, result = bool)
|
@pyqtSlot(str, result = bool)
|
||||||
def isReadOnly(self, container_id: str) -> bool:
|
def isReadOnly(self, container_id: str) -> bool:
|
||||||
|
|
@ -690,13 +682,6 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
@pyqtProperty(str, notify=globalContainerChanged)
|
|
||||||
def activeDefinitionName(self) -> str:
|
|
||||||
if self._global_container_stack:
|
|
||||||
return self._global_container_stack.definition.getName()
|
|
||||||
|
|
||||||
return ""
|
|
||||||
|
|
||||||
## Get the Definition ID to use to select quality profiles for the currently active machine
|
## Get the Definition ID to use to select quality profiles for the currently active machine
|
||||||
# \returns DefinitionID (string) if found, empty string otherwise
|
# \returns DefinitionID (string) if found, empty string otherwise
|
||||||
@pyqtProperty(str, notify = globalContainerChanged)
|
@pyqtProperty(str, notify = globalContainerChanged)
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ UM.Dialog
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: Cura.MachineManager.activeDefinitionName
|
text: Cura.MachineManager.activeMachine.definition.name
|
||||||
width: (parent.width / 3) | 0
|
width: (parent.width / 3) | 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue