From afd87c6fa2a9b6c0f2758497c81f00342f2eb142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 9 Oct 2016 23:58:24 +0200 Subject: [PATCH] Fixed POI loading Better map signal handling --- src/pathview.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pathview.cpp b/src/pathview.cpp index c92384a4..1462f1f8 100644 --- a/src/pathview.cpp +++ b/src/pathview.cpp @@ -321,6 +321,8 @@ void PathView::setPOI(POI *poi) if (_poi) connect(_poi, SIGNAL(reloadRequired()), this, SLOT(updatePOI())); + + updatePOI(); } void PathView::updatePOI() @@ -366,10 +368,14 @@ void PathView::addPOI(const QVector &waypoints) void PathView::setMap(Map *map) { - _map = map; if (_map) - connect(_map, SIGNAL(loaded()), this, SLOT(redraw()), - Qt::UniqueConnection); + disconnect(_map, SIGNAL(loaded()), this, SLOT(redraw())); + + _map = map; + + if (_map) + connect(_map, SIGNAL(loaded()), this, SLOT(redraw())); + resetCachedContent(); }