Expose quality changes id and quality type and make the profile menu work correctly

Contributes to CURA-2006
This commit is contained in:
Arjen Hiemstra 2016-08-10 10:58:44 +02:00
parent 450dcac394
commit 6de7d0170a
2 changed files with 18 additions and 2 deletions

View file

@ -417,6 +417,22 @@ class MachineManager(QObject):
return quality.getId()
return ""
@pyqtProperty(str, notify = activeQualityChanged)
def activeQualityType(self):
if self._global_container_stack:
quality = self._global_container_stack.findContainer(type = "quality")
if quality:
return quality.getMetaDataEntry("quality_type")
return ""
@pyqtProperty(str, notify = activeQualityChanged)
def activeQualityChangesId(self):
if self._global_container_stack:
changes = self._global_container_stack.findContainer(type = "quality_changes")
if changes:
return changes.getId()
return ""
## Check if a container is read_only
@pyqtSlot(str, result = bool)
def isReadOnly(self, container_id):