diff --git a/src/GUI/pathitem.cpp b/src/GUI/pathitem.cpp index d848dda8..8dd7cd09 100644 --- a/src/GUI/pathitem.cpp +++ b/src/GUI/pathitem.cpp @@ -196,6 +196,8 @@ void PathItem::setDigitalZoom(int zoom) _digitalZoom = zoom; _pen.setWidthF(_width * pow(2, -_digitalZoom)); _marker->setScale(pow(2, -_digitalZoom)); + for (int i = 0; i < _ticks.size(); i++) + _ticks.at(i)->setDigitalZoom(zoom); updateShape(); } diff --git a/src/GUI/pathtickitem.h b/src/GUI/pathtickitem.h index 48af0fc5..6eb13fe9 100644 --- a/src/GUI/pathtickitem.h +++ b/src/GUI/pathtickitem.h @@ -16,6 +16,7 @@ public: void setPos(const QPointF &pos); void setColor(const QColor &color) {_brush = QBrush(color);} + void setDigitalZoom(int zoom) {setScale(pow(2, -zoom));} int type() const {return parentItem()->type();} QString info() const {return static_cast(parentItem())->info();} diff --git a/src/GUI/routeitem.cpp b/src/GUI/routeitem.cpp index 112aaa61..b13b8565 100644 --- a/src/GUI/routeitem.cpp +++ b/src/GUI/routeitem.cpp @@ -69,3 +69,11 @@ void RouteItem::showWaypointLabels(bool show) for (int i = 0; i < _waypoints.count(); i++) _waypoints[i]->showLabel(show); } + +void RouteItem::setDigitalZoom(int zoom) +{ + for (int i = 0; i < _waypoints.count(); i++) + _waypoints[i]->setDigitalZoom(zoom); + + PathItem::setDigitalZoom(zoom); +} diff --git a/src/GUI/routeitem.h b/src/GUI/routeitem.h index 8c815e8a..6143de5d 100644 --- a/src/GUI/routeitem.h +++ b/src/GUI/routeitem.h @@ -16,6 +16,7 @@ public: RouteItem(const Route &route, Map *map, QGraphicsItem *parent = 0); void setMap(Map *map); + void setDigitalZoom(int zoom); void showWaypoints(bool show); void showWaypointLabels(bool show);