Improve feedback for expressions in the form editor

This commit is contained in:
Marco Bubke
2010-02-09 18:04:49 +01:00
parent 9f3ac20bd2
commit d1618e1a30

View File

@@ -141,7 +141,10 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r
painter->restore();
if (m_beginXHasExpression != m_feedbackNode.hasBindingProperty("x")) {
if (m_beginXHasExpression) {
if(m_feedbackNode.hasBindingProperty("x"))
painter->setPen(Qt::blue);
else
painter->setPen(Qt::red);
} else {
if (m_beginX != m_feedbackNode.instanceValue("x"))
@@ -154,7 +157,10 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r
painter->drawText(QPoint(14.0, 12.0), m_feedbackNode.instanceValue("x").toString());
if (m_beginYHasExpression != m_feedbackNode.hasBindingProperty("y")) {
if (m_beginYHasExpression) {
if(m_feedbackNode.hasBindingProperty("y"))
painter->setPen(Qt::blue);
else
painter->setPen(Qt::red);
} else {
if (m_beginY != m_feedbackNode.instanceValue("y"))
@@ -167,7 +173,10 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r
painter->drawText(QPoint(60.0, 12.0), m_feedbackNode.instanceValue("y").toString());
if (m_beginWidthHasExpression != m_feedbackNode.hasBindingProperty("width")) {
if (m_beginWidthHasExpression) {
if(m_feedbackNode.hasBindingProperty("width"))
painter->setPen(Qt::blue);
else
painter->setPen(Qt::red);
} else {
if (m_beginWidth != m_feedbackNode.instanceValue("width"))
@@ -180,7 +189,10 @@ void FormEditorGraphicsView::drawForeground(QPainter *painter, const QRectF &/*r
painter->drawText(QPoint(14.0, 24.0), m_feedbackNode.instanceValue("width").toString());
if (m_beginHeightHasExpression != m_feedbackNode.hasBindingProperty("height")) {
if (m_beginHeightHasExpression) {
if(m_feedbackNode.hasBindingProperty("height"))
painter->setPen(Qt::blue);
else
painter->setPen(Qt::red);
} else {
if (m_beginHeight != m_feedbackNode.instanceValue("height"))