mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Show qualities for the material associated with the currently selected quality
CURA-2095
This commit is contained in:
parent
52dda935fc
commit
1003066ce1
2 changed files with 10 additions and 1 deletions
|
@ -477,6 +477,15 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify=activeQualityChanged)
|
||||||
|
def activeQualityMaterialId(self):
|
||||||
|
if self._active_container_stack:
|
||||||
|
quality = self._active_container_stack.findContainer({"type": "quality"})
|
||||||
|
if quality:
|
||||||
|
return quality.getMetaDataEntry("material")
|
||||||
|
|
||||||
|
return ""
|
||||||
|
|
||||||
@pyqtProperty(str, notify=activeQualityChanged)
|
@pyqtProperty(str, notify=activeQualityChanged)
|
||||||
def activeQualityName(self):
|
def activeQualityName(self):
|
||||||
if self._active_container_stack:
|
if self._active_container_stack:
|
||||||
|
|
|
@ -83,7 +83,7 @@ import Cura 1.0 as Cura
|
||||||
result.definition = Cura.MachineManager.activeDefinitionId;
|
result.definition = Cura.MachineManager.activeDefinitionId;
|
||||||
if(Cura.MachineManager.hasMaterials)
|
if(Cura.MachineManager.hasMaterials)
|
||||||
{
|
{
|
||||||
result.material = Cura.MachineManager.activeMaterialId;
|
result.material = Cura.MachineManager.activeQualityMaterialId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue