mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Added read-only property to profiles
CURA-1585
This commit is contained in:
parent
113da81db5
commit
4fc565711d
11 changed files with 19 additions and 1 deletions
|
@ -246,6 +246,15 @@ class MachineManagerModel(QObject):
|
|||
return quality.getId()
|
||||
return ""
|
||||
|
||||
## Check if a container is read_only
|
||||
@pyqtSlot(str, result = bool)
|
||||
def isReadOnly(self, container_id):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=container_id)
|
||||
if not containers or not self._global_container_stack:
|
||||
return True
|
||||
return containers[0].getMetaDataEntry("read_only", False) == "True"
|
||||
|
||||
|
||||
@pyqtSlot(str)
|
||||
def setActiveMaterial(self, material_id):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=material_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue