forked from qt-creator/qt-creator
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:
@@ -82,6 +82,8 @@ StudioControls.SplitView {
|
|||||||
HelperWidgets.Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth }
|
HelperWidgets.Spacer { implicitWidth: StudioTheme.Values.actionIndicatorWidth }
|
||||||
|
|
||||||
HelperWidgets.ComboBox {
|
HelperWidgets.ComboBox {
|
||||||
|
id : typeComboBox
|
||||||
|
|
||||||
currentIndex: backend.possibleTypeIndex
|
currentIndex: backend.possibleTypeIndex
|
||||||
model: backend.possibleTypes
|
model: backend.possibleTypes
|
||||||
showExtendedFunctionButton: false
|
showExtendedFunctionButton: false
|
||||||
@@ -89,6 +91,11 @@ StudioControls.SplitView {
|
|||||||
enabled: backend.possibleTypes.length > 1
|
enabled: backend.possibleTypes.length > 1
|
||||||
|
|
||||||
onActivated: changeTypeName(currentValue)
|
onActivated: changeTypeName(currentValue)
|
||||||
|
|
||||||
|
Binding {
|
||||||
|
when: !typeComboBox.open
|
||||||
|
typeComboBox.currentIndex: backend.possibleTypeIndex
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user