From d9985cd5a308cece06a88e6203529837f00b33aa Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 3 Oct 2018 12:56:18 +0200 Subject: 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 --- src/location/declarativemaps/qdeclarativepolygonmapitem.cpp | 13 ++----------- src/location/declarativemaps/qdeclarativepolygonmapitem_p.h | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src') 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: -- cgit v1.2.1