From 5c910a6359cd4a3f335898a63b7c6840e353e02b Mon Sep 17 00:00:00 2001 From: Ali Kianian Date: Thu, 20 Mar 2025 17:15:47 +0200 Subject: [PATCH] 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 --- .../QtQuick3D/Material/TopSection.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Material/TopSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Material/TopSection.qml index cc0e8a015b0..f98baa79e45 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Material/TopSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/Material/TopSection.qml @@ -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 + } } } }