Hello community,
here is the log from the commit of package gpxsee for openSUSE:Factory checked in at 2017-05-03 15:57:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gpxsee (Old)
and /work/SRC/openSUSE:Factory/.gpxsee.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gpxsee"
Wed May 3 15:57:02 2017 rev:8 rq:492381 version:4.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/gpxsee/gpxsee.changes 2017-04-25 08:58:46.454117900 +0200
+++ /work/SRC/openSUSE:Factory/.gpxsee.new/gpxsee.changes 2017-05-03 15:57:05.849010700 +0200
@@ -1,0 +2,8 @@
+Tue May 2 00:15:47 CEST 2017 - tumic@cbox.cz
+
+- Update to version 4.6
+ * Fixed broken PDF export/printing (broken map scale/waypoints
+ size).
+ * Improved path projection performance when an atlas is used.
+
+-------------------------------------------------------------------
@@ -65 +73,2 @@
- * Fixed tile downloading issues (multiple downloads, redirect loop).
+ * Fixed tile downloading issues (multiple downloads, redirect
+ loop).
@@ -127 +136,2 @@
- * Added support for proxy connections (using the system-defined proxy).
+ * Added support for proxy connections (using the system-defined
+ proxy).
@@ -149,2 +159,4 @@
- * Fixed infinite download loop on HTTP redirects (and broken images).
- * Fixed handling of GPX files with inconsistent track point entries.
+ * Fixed infinite download loop on HTTP redirects (and broken
+ images).
+ * Fixed handling of GPX files with inconsistent track point
+ entries.
@@ -164 +176,2 @@
- * Fixed broken opening of non-ASCII named files as program arguments.
+ * Fixed broken opening of non-ASCII named files as program
+ arguments.
Old:
----
GPXSee-4.5.tar.gz
New:
----
GPXSee-4.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gpxsee.spec ++++++
--- /var/tmp/diff_new_pack.jxkMKP/_old 2017-05-03 15:57:06.924858818 +0200
+++ /var/tmp/diff_new_pack.jxkMKP/_new 2017-05-03 15:57:06.924858818 +0200
@@ -19,7 +19,7 @@
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name: gpxsee
-Version: 4.5
+Version: 4.6
Release: 1
Summary: GPS log files visualizing and analyzing tool
License: GPL-3.0
++++++ GPXSee-4.5.tar.gz -> GPXSee-4.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/gpxsee.pro new/GPXSee-4.6/gpxsee.pro
--- old/GPXSee-4.5/gpxsee.pro 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/gpxsee.pro 2017-05-01 22:49:01.000000000 +0200
@@ -1,5 +1,5 @@
TARGET = GPXSee
-VERSION = 4.5
+VERSION = 4.6
QT += core \
gui \
network
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/pkg/gpxsee.nsi new/GPXSee-4.6/pkg/gpxsee.nsi
--- old/GPXSee-4.5/pkg/gpxsee.nsi 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/pkg/gpxsee.nsi 2017-05-01 22:49:01.000000000 +0200
@@ -5,7 +5,7 @@
; The name of the installer
Name "GPXSee"
; Program version
-!define VERSION "4.5"
+!define VERSION "4.6"
; The file to write
OutFile "GPXSee-${VERSION}.exe"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/pkg/gpxsee64.nsi new/GPXSee-4.6/pkg/gpxsee64.nsi
--- old/GPXSee-4.5/pkg/gpxsee64.nsi 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/pkg/gpxsee64.nsi 2017-05-01 22:49:01.000000000 +0200
@@ -5,7 +5,7 @@
; The name of the installer
Name "GPXSee"
; Program version
-!define VERSION "4.5"
+!define VERSION "4.6"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/pkg/maps.txt new/GPXSee-4.6/pkg/maps.txt
--- old/GPXSee-4.5/pkg/maps.txt 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/pkg/maps.txt 2017-05-01 22:49:01.000000000 +0200
@@ -1,3 +1,4 @@
Open Topo Map https://a.tile.opentopomap.org/$z/$x/$y.png
-Thunderforest http://tile.thunderforest.com/outdoors/$z/$x/$y.png
Open Street Map http://tile.openstreetmap.org/$z/$x/$y.png
+USGS Topo https://navigator.er.usgs.gov/tiles/tcr.cgi/$z/$x/$y.png
+USGS Imagery https://navigator.er.usgs.gov/tiles/aerial_Imagery.cgi/$z/$x/$y
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/atlas.cpp new/GPXSee-4.6/src/atlas.cpp
--- old/GPXSee-4.5/src/atlas.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/atlas.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -118,6 +118,7 @@
_valid = false;
_zoom = 0;
_name = fi.dir().dirName();
+ _ci = -1; _cz = -1;
if (!isAtlas(tar, fileName))
return;
@@ -201,6 +202,11 @@
{
_zoom = 0;
+ if (br.isNull()) {
+ _zoom = _zooms.size() - 1;
+ return _zoom;
+ }
+
for (int z = 0; z < _zooms.count(); z++) {
for (int i = _zooms.at(z).first; i <= _zooms.at(z).second; i++) {
if (!_bounds.at(i).first.contains(_maps.at(i)->ll2pp(br.center())))
@@ -233,22 +239,33 @@
return _zoom;
}
-QPointF Atlas::ll2xy(const Coordinates &c) const
+QPointF Atlas::ll2xy(const Coordinates &c)
{
- int idx = _zooms.at(_zoom).first;
+ QPointF pp;
- for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
- if (_bounds.at(i).first.contains(_maps.at(i)->ll2pp(c))) {
- idx = i;
- break;
+ if (_cz != _zoom) {
+ _ci = -1;
+ _cz = _zoom;
+ }
+
+ if (_ci >= 0)
+ pp = _maps.at(_ci)->ll2pp(c);
+ if (_ci < 0 || !_bounds.at(_ci).first.contains(pp)) {
+ _ci = _zooms.at(_zoom).first;
+ for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
+ pp = _maps.at(i)->ll2pp(c);
+ if (_bounds.at(i).first.contains(pp)) {
+ _ci = i;
+ break;
+ }
}
}
- QPointF p = _maps.at(idx)->ll2xy(c);
- return p + _bounds.at(idx).second.topLeft();
+ QPointF p = _maps.at(_ci)->pp2xy(pp);
+ return p + _bounds.at(_ci).second.topLeft();
}
-Coordinates Atlas::xy2ll(const QPointF &p) const
+Coordinates Atlas::xy2ll(const QPointF &p)
{
int idx = _zooms.at(_zoom).first;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/atlas.h new/GPXSee-4.6/src/atlas.h
--- old/GPXSee-4.5/src/atlas.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/atlas.h 2017-05-01 22:49:01.000000000 +0200
@@ -24,8 +24,8 @@
qreal zoomIn();
qreal zoomOut();
- QPointF ll2xy(const Coordinates &c) const;
- Coordinates xy2ll(const QPointF &p) const;
+ QPointF ll2xy(const Coordinates &c);
+ Coordinates xy2ll(const QPointF &p);
void draw(QPainter *painter, const QRectF &rect);
@@ -48,6 +48,8 @@
QVector > _zooms;
QVector > _bounds;
int _zoom;
+
+ int _ci, _cz;
};
#endif // ATLAS_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/emptymap.cpp new/GPXSee-4.6/src/emptymap.cpp
--- old/GPXSee-4.5/src/emptymap.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/emptymap.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -64,13 +64,13 @@
painter->fillRect(rect, Qt::white);
}
-QPointF EmptyMap::ll2xy(const Coordinates &c) const
+QPointF EmptyMap::ll2xy(const Coordinates &c)
{
QPointF m = Mercator().ll2xy(c);
return QPointF(m.x() / _scale, m.y() / -_scale);
}
-Coordinates EmptyMap::xy2ll(const QPointF &p) const
+Coordinates EmptyMap::xy2ll(const QPointF &p)
{
QPointF m(p.x() * _scale, -p.y() * _scale);
return Mercator().xy2ll(m);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/emptymap.h new/GPXSee-4.6/src/emptymap.h
--- old/GPXSee-4.5/src/emptymap.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/emptymap.h 2017-05-01 22:49:01.000000000 +0200
@@ -20,8 +20,8 @@
qreal zoomIn();
qreal zoomOut();
- QPointF ll2xy(const Coordinates &c) const;
- Coordinates xy2ll(const QPointF &p) const;
+ QPointF ll2xy(const Coordinates &c);
+ Coordinates xy2ll(const QPointF &p);
void draw(QPainter *painter, const QRectF &rect);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/map.h new/GPXSee-4.6/src/map.h
--- old/GPXSee-4.5/src/map.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/map.h 2017-05-01 22:49:01.000000000 +0200
@@ -25,8 +25,8 @@
virtual qreal zoomIn() = 0;
virtual qreal zoomOut() = 0;
- virtual QPointF ll2xy(const Coordinates &c) const = 0;
- virtual Coordinates xy2ll(const QPointF &p) const = 0;
+ virtual QPointF ll2xy(const Coordinates &c) = 0;
+ virtual Coordinates xy2ll(const QPointF &p) = 0;
virtual void draw(QPainter *painter, const QRectF &rect) = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/offlinemap.cpp new/GPXSee-4.6/src/offlinemap.cpp
--- old/GPXSee-4.5/src/offlinemap.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/offlinemap.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -348,11 +348,12 @@
}
QString suffix = ii.suffix().toLower();
- if (suffix == "ozf3" || suffix == "ozf4") {
+ if (suffix == "ozf3" || suffix == "ozfx3" || suffix == "ozf4"
+ || suffix == "ozfx4") {
_errorString = QString("%1: Obfuscated image files not supported")
.arg(QFileInfo(_imgPath).fileName());
return false;
- } else if (suffix == "ozf2") {
+ } else if (suffix == "ozf2" || suffix == "ozfx2") {
_ozf.load(_imgPath);
_size = _ozf.size();
} else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/offlinemap.h new/GPXSee-4.6/src/offlinemap.h
--- old/GPXSee-4.5/src/offlinemap.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/offlinemap.h 2017-05-01 22:49:01.000000000 +0200
@@ -31,9 +31,9 @@
qreal zoomIn() {return 1.0;}
qreal zoomOut() {return 1.0;}
- QPointF ll2xy(const Coordinates &c) const
+ QPointF ll2xy(const Coordinates &c)
{return _transform.map(_projection->ll2xy(c));}
- Coordinates xy2ll(const QPointF &p) const
+ Coordinates xy2ll(const QPointF &p)
{return _projection->xy2ll(_inverted.map(p));}
void draw(QPainter *painter, const QRectF &rect);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/onlinemap.cpp new/GPXSee-4.6/src/onlinemap.cpp
--- old/GPXSee-4.5/src/onlinemap.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/onlinemap.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -232,13 +232,13 @@
}
}
-QPointF OnlineMap::ll2xy(const Coordinates &c) const
+QPointF OnlineMap::ll2xy(const Coordinates &c)
{
QPointF m = Mercator().ll2xy(c);
return QPointF(m.x() / _scale, m.y() / -_scale);
}
-Coordinates OnlineMap::xy2ll(const QPointF &p) const
+Coordinates OnlineMap::xy2ll(const QPointF &p)
{
QPointF m(p.x() * _scale, -p.y() * _scale);
return Mercator().xy2ll(m);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/onlinemap.h new/GPXSee-4.6/src/onlinemap.h
--- old/GPXSee-4.5/src/onlinemap.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/onlinemap.h 2017-05-01 22:49:01.000000000 +0200
@@ -23,8 +23,8 @@
qreal zoomIn();
qreal zoomOut();
- QPointF ll2xy(const Coordinates &c) const;
- Coordinates xy2ll(const QPointF &p) const;
+ QPointF ll2xy(const Coordinates &c);
+ Coordinates xy2ll(const QPointF &p);
void draw(QPainter *painter, const QRectF &rect);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/pathitem.cpp new/GPXSee-4.6/src/pathitem.cpp
--- old/GPXSee-4.5/src/pathitem.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/pathitem.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -12,20 +12,21 @@
: QGraphicsObject(parent)
{
Q_ASSERT(path.count() >= 2);
+
_path = path;
_map = map;
-
- updatePainterPath(map);
- updateShape();
+ _digitalZoom = 0;
_width = 3;
QBrush brush(Qt::SolidPattern);
_pen = QPen(brush, _width);
+ updatePainterPath(map);
+ updateShape();
+
_marker = new MarkerItem(this);
_marker->setPos(position(_path.at(0).distance()));
- _marker->setFlag(QGraphicsItem::ItemIgnoresTransformations);
- _md = _path.at(0).distance();
+ _markerDistance = _path.at(0).distance();
setCursor(Qt::ArrowCursor);
setAcceptHoverEvents(true);
@@ -34,7 +35,7 @@
void PathItem::updateShape()
{
QPainterPathStroker s;
- s.setWidth((_width + 1) * 1.0/scale());
+ s.setWidth((_width + 1) * pow(2, -_digitalZoom));
_shape = s.createStroke(_painterPath);
}
@@ -71,7 +72,7 @@
updatePainterPath(map);
updateShape();
- _marker->setPos(position(_md));
+ _marker->setPos(position(_markerDistance));
}
void PathItem::setColor(const QColor &color)
@@ -85,7 +86,7 @@
prepareGeometryChange();
_width = width;
- _pen.setWidthF(_width * 1.0/scale());
+ _pen.setWidthF(_width * pow(2, -_digitalZoom));
updateShape();
}
@@ -96,6 +97,17 @@
update();
}
+void PathItem::setDigitalZoom(int zoom)
+{
+ prepareGeometryChange();
+
+ _digitalZoom = zoom;
+ _pen.setWidthF(_width * pow(2, -_digitalZoom));
+ _marker->setScale(pow(2, -_digitalZoom));
+
+ updateShape();
+}
+
QPointF PathItem::position(qreal x) const
{
int low = 0;
@@ -137,7 +149,7 @@
&& distance <= _path.last().distance()) {
_marker->setVisible(true);
_marker->setPos(position(distance));
- _md = distance;
+ _markerDistance = distance;
} else
_marker->setVisible(false);
}
@@ -146,7 +158,7 @@
{
Q_UNUSED(event);
- _pen.setWidthF((_width + 1) * 1.0/scale());
+ _pen.setWidthF((_width + 1) * pow(2, -_digitalZoom));
setZValue(zValue() + 1.0);
update();
@@ -157,7 +169,7 @@
{
Q_UNUSED(event);
- _pen.setWidthF(_width * 1.0/scale());
+ _pen.setWidthF(_width * pow(2, -_digitalZoom));
setZValue(zValue() - 1.0);
update();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/pathitem.h new/GPXSee-4.6/src/pathitem.h
--- old/GPXSee-4.5/src/pathitem.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/pathitem.h 2017-05-01 22:49:01.000000000 +0200
@@ -28,8 +28,7 @@
void setColor(const QColor &color);
void setWidth(qreal width);
void setStyle(Qt::PenStyle style);
-
- void showMarker(bool show) {_marker->setVisible(show);}
+ void setDigitalZoom(int zoom);
public slots:
void moveMarker(qreal distance);
@@ -50,7 +49,8 @@
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
Map *_map;
- qreal _md;
+ qreal _markerDistance;
+ int _digitalZoom;
qreal _width;
QPen _pen;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/pathview.cpp new/GPXSee-4.6/src/pathview.cpp
--- old/GPXSee-4.5/src/pathview.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/pathview.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -50,7 +50,6 @@
_mapScale = new ScaleItem();
_mapScale->setZValue(2.0);
- _mapScale->setFlag(QGraphicsItem::ItemIgnoresTransformations);
_map = map;
_poi = poi;
@@ -97,9 +96,10 @@
_tracks.append(ti);
_tr |= ti->path().boundingRect();
ti->setColor(_palette.nextColor());
- ti->setWidth(_trackWidth * pow(2, -_digitalZoom));
+ ti->setWidth(_trackWidth);
ti->setStyle(_trackStyle);
ti->setVisible(_showTracks);
+ ti->setDigitalZoom(_digitalZoom);
_scene->addItem(ti);
addPOI(_poi->points(ti->path()));
@@ -118,11 +118,12 @@
_routes.append(ri);
_rr |= ri->path().boundingRect();
ri->setColor(_palette.nextColor());
- ri->setWidth(_routeWidth * pow(2, -_digitalZoom));
+ ri->setWidth(_routeWidth);
ri->setStyle(_routeStyle);
ri->setVisible(_showRoutes);
ri->showWaypoints(_showRouteWaypoints);
ri->showWaypointLabels(_showWaypointLabels);
+ ri->setDigitalZoom(_digitalZoom);
_scene->addItem(ri);
addPOI(_poi->points(ri->path()));
@@ -142,7 +143,7 @@
wi->setZValue(1);
wi->showLabel(_showWaypointLabels);
wi->setVisible(_showWaypoints);
- wi->setFlag(QGraphicsItem::ItemIgnoresTransformations);
+ wi->setDigitalZoom(_digitalZoom);
_scene->addItem(wi);
}
@@ -340,7 +341,7 @@
pi->setZValue(1);
pi->showLabel(_showPOILabels);
pi->setVisible(_showPOI);
- pi->setFlag(QGraphicsItem::ItemIgnoresTransformations);
+ pi->setDigitalZoom(_digitalZoom);
_scene->addItem(pi);
_pois.insert(w, pi);
@@ -372,23 +373,40 @@
void PathView::resetDigitalZoom()
{
- _digitalZoom = 0;
+ QHash::const_iterator it;
+ _digitalZoom = 0;
resetTransform();
- setTrackWidth(_trackWidth);
- setRouteWidth(_routeWidth);
+ for (int i = 0; i < _tracks.size(); i++)
+ _tracks.at(i)->setDigitalZoom(0);
+ for (int i = 0; i < _routes.size(); i++)
+ _routes.at(i)->setDigitalZoom(0);
+ for (int i = 0; i < _waypoints.size(); i++)
+ _waypoints.at(i)->setDigitalZoom(0);
+ for (it = _pois.constBegin(); it != _pois.constEnd(); it++)
+ it.value()->setDigitalZoom(0);
+
+ _mapScale->setDigitalZoom(0);
}
void PathView::digitalZoom(int zoom)
{
+ QHash::const_iterator it;
+
_digitalZoom += zoom;
scale(pow(2, zoom), pow(2, zoom));
- setTrackWidth(_trackWidth);
- setRouteWidth(_routeWidth);
+ for (int i = 0; i < _tracks.size(); i++)
+ _tracks.at(i)->setDigitalZoom(_digitalZoom);
+ for (int i = 0; i < _routes.size(); i++)
+ _routes.at(i)->setDigitalZoom(_digitalZoom);
+ for (int i = 0; i < _waypoints.size(); i++)
+ _waypoints.at(i)->setDigitalZoom(_digitalZoom);
+ for (it = _pois.constBegin(); it != _pois.constEnd(); it++)
+ it.value()->setDigitalZoom(_digitalZoom);
- _mapScale->setResolution(_res * pow(2, -_digitalZoom));
+ _mapScale->setDigitalZoom(_digitalZoom);
}
void PathView::zoom(int zoom, const QPoint &pos, const Coordinates &c)
@@ -519,9 +537,7 @@
_tr = QRectF(); _rr = QRectF(); _wr = QRectF();
_wp = QPointF();
- _digitalZoom = 0;
- resetTransform();
-
+ resetDigitalZoom();
resetCachedContent();
}
@@ -608,7 +624,7 @@
_trackWidth = width;
for (int i = 0; i < _tracks.count(); i++)
- _tracks.at(i)->setWidth(width * pow(2, -_digitalZoom));
+ _tracks.at(i)->setWidth(width);
}
void PathView::setRouteWidth(int width)
@@ -616,7 +632,7 @@
_routeWidth = width;
for (int i = 0; i < _routes.count(); i++)
- _routes.at(i)->setWidth(width * pow(2, -_digitalZoom));
+ _routes.at(i)->setWidth(width);
}
void PathView::setTrackStyle(Qt::PenStyle style)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/scaleitem.cpp new/GPXSee-4.6/src/scaleitem.cpp
--- old/GPXSee-4.5/src/scaleitem.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/scaleitem.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -1,3 +1,4 @@
+#include <cmath>
#include <QPainter>
#include "config.h"
#include "misc.h"
@@ -15,6 +16,7 @@
{
_units = Metric;
_res = 1.0;
+ _digitalZoom = 0;
#ifndef Q_OS_MAC
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
@@ -87,24 +89,26 @@
void ScaleItem::computeScale()
{
+ qreal res = _res * pow(2, -_digitalZoom);
+
if (_units == Imperial) {
- _length = niceNum((_res * M2FT * SCALE_WIDTH) / SEGMENTS, 1);
+ _length = niceNum((res * M2FT * SCALE_WIDTH) / SEGMENTS, 1);
if (_length >= MIINFT) {
- _length = niceNum((_res * M2FT * FT2MI * SCALE_WIDTH) / SEGMENTS, 1);
- _width = (_length / (_res * M2FT * FT2MI));
+ _length = niceNum((res * M2FT * FT2MI * SCALE_WIDTH) / SEGMENTS, 1);
+ _width = (_length / (res * M2FT * FT2MI));
_scale = true;
} else {
- _width = (_length / (_res * M2FT));
+ _width = (_length / (res * M2FT));
_scale = false;
}
} else {
- _length = niceNum((_res * SCALE_WIDTH) / SEGMENTS, 1);
+ _length = niceNum((res * SCALE_WIDTH) / SEGMENTS, 1);
if (_length >= KMINM) {
_length *= M2KM;
- _width = (_length / (_res * M2KM));
+ _width = (_length / (res * M2KM));
_scale = true;
} else {
- _width = (_length / _res);
+ _width = (_length / res);
_scale = false;
}
}
@@ -127,3 +131,14 @@
updateBoundingRect();
update();
}
+
+void ScaleItem::setDigitalZoom(int zoom)
+{
+ prepareGeometryChange();
+ _digitalZoom = zoom;
+ computeScale();
+ updateBoundingRect();
+ update();
+
+ setScale(pow(2, -_digitalZoom));
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/scaleitem.h new/GPXSee-4.6/src/scaleitem.h
--- old/GPXSee-4.5/src/scaleitem.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/scaleitem.h 2017-05-01 22:49:01.000000000 +0200
@@ -15,6 +15,7 @@
void setResolution(qreal res);
void setUnits(enum Units units);
+ void setDigitalZoom(int zoom);
private:
void updateBoundingRect();
@@ -27,6 +28,8 @@
Units _units;
bool _scale;
+ int _digitalZoom;
+
QRectF _boundingRect;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/waypointitem.cpp new/GPXSee-4.6/src/waypointitem.cpp
--- old/GPXSee-4.5/src/waypointitem.cpp 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/waypointitem.cpp 2017-05-01 22:49:01.000000000 +0200
@@ -3,7 +3,6 @@
#include "config.h"
#include "format.h"
#include "tooltip.h"
-#include "map.h"
#include "waypointitem.h"
@@ -46,11 +45,6 @@
setAcceptHoverEvents(true);
}
-void WaypointItem::setMap(Map *map)
-{
- setPos(map->ll2xy(_waypoint.coordinates()));
-}
-
void WaypointItem::updateShape()
{
QPainterPath p;
@@ -106,14 +100,6 @@
*/
}
-/*
-void WaypointItem::setScale(qreal scale)
-{
- QPointF p = _map->ll2xy(_waypoint.coordinates());
- setPos(QPointF(p.x(), -p.y()) * scale);
-}
-*/
-
void WaypointItem::setUnits(enum Units units)
{
setToolTip(toolTip(units));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-4.5/src/waypointitem.h new/GPXSee-4.6/src/waypointitem.h
--- old/GPXSee-4.5/src/waypointitem.h 2017-04-23 18:15:08.000000000 +0200
+++ new/GPXSee-4.6/src/waypointitem.h 2017-05-01 22:49:01.000000000 +0200
@@ -1,11 +1,11 @@
#ifndef WAYPOINTITEM_H
#define WAYPOINTITEM_H
+#include <cmath>
#include <QGraphicsItem>
#include "waypoint.h"
#include "units.h"
-
-class Map;
+#include "map.h"
class WaypointItem : public QGraphicsItem
{
@@ -14,9 +14,10 @@
const Waypoint &waypoint() const {return _waypoint;}
- void setMap(Map *map);
+ void setMap(Map *map) {setPos(map->ll2xy(_waypoint.coordinates()));}
void setUnits(Units units);
void showLabel(bool show);
+ void setDigitalZoom(int zoom) {setScale(pow(2, -zoom));}
QPainterPath shape() const {return _shape;}
QRectF boundingRect() const {return _shape.boundingRect();}
++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.jxkMKP/_old 2017-05-03 15:57:07.184822118 +0200
+++ /var/tmp/diff_new_pack.jxkMKP/_new 2017-05-03 15:57:07.184822118 +0200
@@ -1,3 +1,10 @@
+gpxsee (4.6) stable; urgency=low
+
+ * Fixed broken PDF export/printing (broken map scale/waypoints size).
+ * Improved path projection performance when an atlas is used.
+
+ -- Martin Tuma Tue, 02 May 2017 00:25:11 +0200
+
gpxsee (4.5) stable; urgency=low
* Added support for "runtime" loading of offline maps.
++++++ gpxsee.dsc ++++++
--- /var/tmp/diff_new_pack.jxkMKP/_old 2017-05-03 15:57:07.288807439 +0200
+++ /var/tmp/diff_new_pack.jxkMKP/_new 2017-05-03 15:57:07.288807439 +0200
@@ -1,9 +1,9 @@
Format: 1.0
Source: gpxsee
-Version: 4.5
+Version: 4.6
Binary: gpxsee
Maintainer: Martin Tuma
Architecture: any
Build-Depends: debhelper (>= 9), qtbase5-dev, qtbase5-dev-tools, qt5-qmake, qttools5-dev-tools, libqt5opengl5-dev
Files:
- 00000000000000000000000000000000 0 GPXSee-4.5.tar.gz
+ 00000000000000000000000000000000 0 GPXSee-4.6.tar.gz