PropertyEditor: Resync Material type after attempting to change it

Since changing the type might be canceled by the user in the case that
there are incompatible properties, we should resync the combobox value.

Fixes: QDS-14947
Change-Id: Ic4128ed87b242c230687e72a9171b809c026daf8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Ali Kianian
2025-03-20 17:15:47 +02:00
parent 373e08d014
commit 5c910a6359

View File

@@ -82,6 +82,8 @@ StudioControls.SplitView {
HelperWidgets.Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth }
HelperWidgets.ComboBox {
id : typeComboBox
currentIndex: backend.possibleTypeIndex
model: backend.possibleTypes
showExtendedFunctionButton: false
@@ -89,6 +91,11 @@ StudioControls.SplitView {
enabled: backend.possibleTypes.length > 1
onActivated: changeTypeName(currentValue)
Binding {
when: !typeComboBox.open
typeComboBox.currentIndex: backend.possibleTypeIndex
}
}
}
}