From 79576601dbd7d5cc288216111592091d790085b6 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Thu, 15 Aug 2019 14:05:44 +0200 Subject: [PATCH] QmlDesigner Fix for Gradient Presets Change-Id: I1d3d2f61f978c6bfb52ad4ea42f2c6756a2a0483 Reviewed-by: Thomas Hartmann --- .../imports/HelperWidgets/ColorEditor.qml | 8 ++++++++ 1 file changed, 8 insertions(+) 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); }