diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-10-03 12:56:18 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-11-19 21:23:33 +0000 |
commit | d9985cd5a308cece06a88e6203529837f00b33aa (patch) | |
tree | b863d45c298d3da3f8249cfbfd9f040b3387577d | |
parent | 85df79b094d1097108a28424d6f9b3b76b3aee62 (diff) | |
download | qtlocation-d9985cd5a308cece06a88e6203529837f00b33aa.tar.gz |
Fix missing geometry update when changing border width
In this case, only border geometry was marked dirty, producing a
misplaced polygon.
Fixes: QTBUG-70886
Change-Id: Ied39e523a584976871a655e436daf8c2700458b6
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/location/declarativemaps/qdeclarativepolygonmapitem.cpp | 13 | ||||
-rw-r--r-- | src/location/declarativemaps/qdeclarativepolygonmapitem_p.h | 1 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp index c0d7f24b..e9f91e45 100644 --- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp +++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp @@ -320,18 +320,9 @@ QDeclarativePolygonMapItem::QDeclarativePolygonMapItem(QQuickItem *parent) { setFlag(ItemHasContents, true); QObject::connect(&border_, SIGNAL(colorChanged(QColor)), - this, SLOT(handleBorderUpdated())); + this, SLOT(markSourceDirtyAndUpdate())); QObject::connect(&border_, SIGNAL(widthChanged(qreal)), - this, SLOT(handleBorderUpdated())); -} - -/*! - \internal -*/ -void QDeclarativePolygonMapItem::handleBorderUpdated() -{ - borderGeometry_.markSourceDirty(); - polishAndUpdate(); + this, SLOT(markSourceDirtyAndUpdate())); } QDeclarativePolygonMapItem::~QDeclarativePolygonMapItem() diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h b/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h index 83983651..60e81b08 100644 --- a/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h +++ b/src/location/declarativemaps/qdeclarativepolygonmapitem_p.h @@ -118,7 +118,6 @@ protected: protected Q_SLOTS: void markSourceDirtyAndUpdate(); - void handleBorderUpdated(); virtual void afterViewportChanged(const QGeoMapViewportChangeEvent &event) override; private: |