From 4daa9fd55c056de0e83ff6c2b3409354fdecec7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 3 Apr 2019 09:18:33 +0200 Subject: [PATCH] Fixed coordinates info not displayed issues --- src/GUI/coordinatesitem.cpp | 2 ++ src/GUI/mapview.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GUI/coordinatesitem.cpp b/src/GUI/coordinatesitem.cpp index 8f2cf2fc..69aecf6a 100644 --- a/src/GUI/coordinatesitem.cpp +++ b/src/GUI/coordinatesitem.cpp @@ -13,6 +13,8 @@ CoordinatesItem::CoordinatesItem(QGraphicsItem *parent) : QGraphicsItem(parent) _digitalZoom = 0; + setAcceptHoverEvents(true); + updateBoundingRect(); } diff --git a/src/GUI/mapview.cpp b/src/GUI/mapview.cpp index 0d2692d1..7ac1a76e 100644 --- a/src/GUI/mapview.cpp +++ b/src/GUI/mapview.cpp @@ -39,7 +39,6 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent) setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setRenderHint(QPainter::Antialiasing, true); setAcceptDrops(false); - setMouseTracking(true); _mapScale = new ScaleItem(); _mapScale->setZValue(2.0); @@ -752,6 +751,7 @@ void MapView::showPOILabels(bool show) void MapView::showCoordinates(bool show) { _coordinates->setVisible(show); + setMouseTracking(show); } void MapView::setPOIOverlap(bool overlap)