diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml index 878d26c15e3..15246a4405a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml @@ -533,6 +533,14 @@ Column { visible: false function applyPreset() { + if (!gradientLine.hasGradient) + { + if (colorEditor.shapeGradients) + gradientLine.gradientTypeName = "LinearGradient" + else + gradientLine.gradientTypeName = "Gradient" + } + if (presetList.gradientData.presetType == 0) { gradientLine.setPresetByID(presetList.gradientData.presetID); }