diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-03-15 04:26:20 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-03-15 04:36:18 (GMT) |
commit | 77342ad3e7beecb75c136ee26c0c77cd1a41b415 (patch) | |
tree | 432d5ab324799a52cfe4eb62f73fe1e5fe22e70e | |
parent | ce38c6e3a9b7eb336cbd9cd1e9520a5000c8f8ac (diff) | |
download | Qt-77342ad3e7beecb75c136ee26c0c77cd1a41b415.zip Qt-77342ad3e7beecb75c136ee26c0c77cd1a41b415.tar.gz Qt-77342ad3e7beecb75c136ee26c0c77cd1a41b415.tar.bz2 |
Border still drawn on Rectangle elements when border.width == 0
The _valid flag did not consider both color alpha and line width in
both setters.
Change-Id: Iba544d65a0a40e36f1e09091e007418c9eefa0cd
Task-number: QTBUG-18102
Reviewed-by: Alan Alpert
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativerectangle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index d962919..8f59073 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE void QDeclarativePen::setColor(const QColor &c) { _color = c; - _valid = _color.alpha() ? true : false; + _valid = (_color.alpha() && _width >= 1) ? true : false; emit penChanged(); } @@ -80,7 +80,7 @@ void QDeclarativePen::setWidth(int w) return; _width = w; - _valid = (_width < 1) ? false : true; + _valid = (_color.alpha() && _width >= 1) ? true : false; emit penChanged(); } |