mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:59:01 +08:00
Fix SettingComboBox and SettingExtruder in some contexts
Use propertyProvider instead of provider; fixes comboboxes in PostProcessing plugin.
This commit is contained in:
parent
614d4bb21a
commit
1bbf987921
@ -86,18 +86,18 @@ SettingItem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated: { forceActiveFocus(); provider.setPropertyValue("value", definition.options[index].key) }
|
onActivated: { forceActiveFocus(); propertyProvider.setPropertyValue("value", definition.options[index].key) }
|
||||||
onModelChanged: updateCurrentIndex();
|
onModelChanged: updateCurrentIndex();
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: provider
|
target: propertyProvider
|
||||||
onPropertiesChanged: control.updateCurrentIndex()
|
onPropertiesChanged: control.updateCurrentIndex()
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCurrentIndex() {
|
function updateCurrentIndex() {
|
||||||
for(var i = 0; i < definition.options.length; ++i) {
|
for(var i = 0; i < definition.options.length; ++i) {
|
||||||
if(definition.options[i].key == provider.properties.value) {
|
if(definition.options[i].key == propertyProvider.properties.value) {
|
||||||
currentIndex = i;
|
currentIndex = i;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -105,13 +105,13 @@ SettingItem
|
|||||||
onActivated:
|
onActivated:
|
||||||
{
|
{
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
provider.setPropertyValue("value", extruders_model.getItem(index).index)
|
propertyProvider.setPropertyValue("value", extruders_model.getItem(index).index)
|
||||||
}
|
}
|
||||||
onModelChanged: updateCurrentIndex();
|
onModelChanged: updateCurrentIndex();
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: provider
|
target: propertyProvider
|
||||||
onPropertiesChanged: control.updateCurrentIndex();
|
onPropertiesChanged: control.updateCurrentIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ SettingItem
|
|||||||
{
|
{
|
||||||
for(var i = 0; i < extruders_model.rowCount(); ++i)
|
for(var i = 0; i < extruders_model.rowCount(); ++i)
|
||||||
{
|
{
|
||||||
if(extruders_model.getItem(i).index == provider.properties.value)
|
if(extruders_model.getItem(i).index == propertyProvider.properties.value)
|
||||||
{
|
{
|
||||||
currentIndex = i;
|
currentIndex = i;
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user