From c0adabe3f172021ad1385a7df82569fb7e359c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 15 Oct 2018 01:15:00 +0200 Subject: [PATCH] Code cleanup --- src/GUI/mapview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/GUI/mapview.cpp b/src/GUI/mapview.cpp index 8a0d6ade..32eca89e 100644 --- a/src/GUI/mapview.cpp +++ b/src/GUI/mapview.cpp @@ -21,6 +21,7 @@ #define MARGIN 10 #define SCALE_OFFSET 7 + MapView::MapView(Map *map, POI *poi, QWidget *parent) : QGraphicsView(parent) { @@ -438,10 +439,10 @@ void MapView::zoom(int zoom, const QPoint &pos) digitalZoom(zoom); } else { Coordinates c = _map->xy2ll(mapToScene(pos)); - qreal os = _map->zoom(); - qreal ns = (zoom > 0) ? _map->zoomIn() : _map->zoomOut(); + int oz = _map->zoom(); + int nz = (zoom > 0) ? _map->zoomIn() : _map->zoomOut(); - if (ns != os) { + if (nz != oz) { rescale(); centerOn(_map->ll2xy(c) - (pos - viewport()->rect().center())); } else {