Prevent undefined qml warnings

CURA-6935
This commit is contained in:
Jaime van Kessel 2019-10-29 10:55:47 +01:00
parent 2beeca0687
commit 007add7fc2
No known key found for this signature in database
GPG key ID: 3710727397403C91
2 changed files with 5 additions and 1 deletions

View file

@ -75,7 +75,7 @@ SettingItem
base.setActiveFocusToNextSetting(false)
}
currentIndex: propertyProvider.properties.value
currentIndex: propertyProvider.properties.value !== undefined ? propertyProvider.properties.value : 0
property string color: "#fff"

View file

@ -277,6 +277,10 @@ Item
// Observed when loading workspace, probably when SettingItems are removed.
return false
}
if(globalPropertyProvider.properties.limit_to_extruder === undefined)
{
return false
}
return Cura.SettingInheritanceManager.getOverridesForExtruder(definition.key, String(globalPropertyProvider.properties.limit_to_extruder)).indexOf(definition.key) >= 0
}