From 8872bb70d5d105664c871173ffc89a1a000615d5 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 22 Dec 2010 17:16:52 +0100 Subject: [PATCH] QmlDesigner.propertyEditor: fixing GradientLineQmlAdaptor Fixing slight behaivour changes of refactoring. --- .../qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp b/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp index 67b1dfcc5a..1fa1714d77 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp @@ -15,6 +15,7 @@ namespace QmlDesigner { GradientLineQmlAdaptor::GradientLineQmlAdaptor(QWidget *parent) : QmlEditorWidgets::GradientLine(parent) { + setActive(false); connect(this, SIGNAL(gradientChanged()), this, SLOT(writeGradient())); } @@ -24,7 +25,6 @@ void GradientLineQmlAdaptor::setItemNode(const QVariant &itemNode) if (!itemNode.value().isValid()) return; m_itemNode = itemNode.value(); - setupGradient(); emit itemNodeChanged(); } @@ -43,6 +43,9 @@ static inline qreal roundReal(qreal real) void GradientLineQmlAdaptor::setupGradient() { + if (!active()) + return; + ModelNode modelNode = m_itemNode.modelNode(); QLinearGradient newGradient; QVector stops; -- 2.11.0