diff options
Diffstat (limited to 'src/imports/location/qdeclarativegeomap.cpp')
-rw-r--r-- | src/imports/location/qdeclarativegeomap.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp index 7e000c06..a8d93fab 100644 --- a/src/imports/location/qdeclarativegeomap.cpp +++ b/src/imports/location/qdeclarativegeomap.cpp @@ -45,7 +45,7 @@ #include <QtPositioning/QGeoCircle> #include <QtPositioning/QGeoRectangle> #include <QtQuick/QQuickWindow> -#include <QtQuick/QSGSimpleRectNode> +#include <QtQuick/QSGRectangleNode> #include <QtQuick/private/qquickwindow_p.h> #include <QtQml/qqmlinfo.h> #include <cmath> @@ -450,13 +450,12 @@ QSGNode *QDeclarativeGeoMap::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa return 0; } - QSGSimpleRectNode *root = static_cast<QSGSimpleRectNode *>(oldNode); + QSGRectangleNode *root = static_cast<QSGRectangleNode *>(oldNode); if (!root) - root = new QSGSimpleRectNode(boundingRect(), m_color); - else { - root->setRect(boundingRect()); - root->setColor(m_color); - } + root = window()->createRectangleNode(); + + root->setRect(boundingRect()); + root->setColor(m_color); QSGNode *content = root->childCount() ? root->firstChild() : 0; content = m_map->updateSceneGraph(content, window()); |