OSDN Git Service
(root)
/
qt-creator-jp
/
qt-creator-jp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
QmlDesigner.propertyEditor: fixing GradientLineQmlAdaptor
[qt-creator-jp/qt-creator-jp.git]
/
src
/
plugins
/
qmldesigner
/
components
/
propertyeditor
/
gradientlineqmladaptor.cpp
diff --git
a/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp
b/src/plugins/qmldesigner/components/propertyeditor/gradientlineqmladaptor.cpp
index
67b1dfc
..
1fa1714
100644
(file)
--- 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)
{
GradientLineQmlAdaptor::GradientLineQmlAdaptor(QWidget *parent) :
QmlEditorWidgets::GradientLine(parent)
{
+ setActive(false);
connect(this, SIGNAL(gradientChanged()), this, SLOT(writeGradient()));
}
connect(this, SIGNAL(gradientChanged()), this, SLOT(writeGradient()));
}
@@
-24,7
+25,6
@@
void GradientLineQmlAdaptor::setItemNode(const QVariant &itemNode)
if (!itemNode.value<ModelNode>().isValid())
return;
m_itemNode = itemNode.value<ModelNode>();
if (!itemNode.value<ModelNode>().isValid())
return;
m_itemNode = itemNode.value<ModelNode>();
- setupGradient();
emit itemNodeChanged();
}
emit itemNodeChanged();
}
@@
-43,6
+43,9
@@
static inline qreal roundReal(qreal real)
void GradientLineQmlAdaptor::setupGradient()
{
void GradientLineQmlAdaptor::setupGradient()
{
+ if (!active())
+ return;
+
ModelNode modelNode = m_itemNode.modelNode();
QLinearGradient newGradient;
QVector<QGradientStop> stops;
ModelNode modelNode = m_itemNode.modelNode();
QLinearGradient newGradient;
QVector<QGradientStop> stops;