mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +08:00
Fix bad call to keys function on string.
Also fix assigning currentIndex to correct Component. CURA-9793
This commit is contained in:
parent
396057a56f
commit
0e5ad96207
@ -74,6 +74,12 @@ UM.TooltipArea
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof propertyProvider.properties["options"] == "string")
|
||||||
|
{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (var i = 0; i < propertyProvider.properties["options"].keys().length; i++)
|
for (var i = 0; i < propertyProvider.properties["options"].keys().length; i++)
|
||||||
{
|
{
|
||||||
var key = propertyProvider.properties["options"].keys()[i]
|
var key = propertyProvider.properties["options"].keys()[i]
|
||||||
@ -82,7 +88,7 @@ UM.TooltipArea
|
|||||||
|
|
||||||
if (propertyProvider.properties.value == key)
|
if (propertyProvider.properties.value == key)
|
||||||
{
|
{
|
||||||
currentIndex = i
|
comboBox.currentIndex = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,7 +132,7 @@ UM.TooltipArea
|
|||||||
onActivated:
|
onActivated:
|
||||||
{
|
{
|
||||||
var newValue = model.get(index).value
|
var newValue = model.get(index).value
|
||||||
if (propertyProvider.properties.value != newValue)
|
if (propertyProvider.properties.value != newValue && newValue != undefined)
|
||||||
{
|
{
|
||||||
if (setValueFunction !== null)
|
if (setValueFunction !== null)
|
||||||
{
|
{
|
||||||
@ -134,6 +140,7 @@ UM.TooltipArea
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
print("SETTING PROPERTY VALUE: " + newValue)
|
||||||
propertyProvider.setPropertyValue("value", newValue)
|
propertyProvider.setPropertyValue("value", newValue)
|
||||||
}
|
}
|
||||||
forceUpdateOnChangeFunction()
|
forceUpdateOnChangeFunction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user