Fix showing/hiding variant/material dropdowns when switching between machines

CURA-340
This commit is contained in:
fieldOfView 2016-06-12 20:55:25 +02:00
parent c592d71051
commit 534a4adc8e

View file

@ -477,14 +477,14 @@ class MachineManagerModel(QObject):
@pyqtProperty(bool, notify = globalContainerChanged) @pyqtProperty(bool, notify = globalContainerChanged)
def hasMaterials(self): def hasMaterials(self):
if self._active_container_stack: if self._active_container_stack:
return bool(self._active_container_stack.getMetaDataEntry("has_materials", False)) return bool(self._global_container_stack.getMetaDataEntry("has_materials", False))
return False return False
@pyqtProperty(bool, notify = globalContainerChanged) @pyqtProperty(bool, notify = globalContainerChanged)
def hasVariants(self): def hasVariants(self):
if self._active_container_stack: if self._active_container_stack:
return bool(self._active_container_stack.getMetaDataEntry("has_variants", False)) return bool(self._global_container_stack.getMetaDataEntry("has_variants", False))
return False return False