mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Properly sort the Orux maps zoom levels
This commit is contained in:
parent
a01ff33768
commit
7b8fff7440
@ -351,11 +351,12 @@ OruxMap::OruxMap(const QString &fileName, QObject *parent)
|
|||||||
{
|
{
|
||||||
if (!readXML(fileName))
|
if (!readXML(fileName))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_zooms.isEmpty()) {
|
if (_zooms.isEmpty()) {
|
||||||
_errorString = "No usable zoom level found";
|
_errorString = "No usable zoom level found";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
std::sort(_zooms.begin(), _zooms.end());
|
||||||
|
|
||||||
|
|
||||||
QFileInfo fi(fileName);
|
QFileInfo fi(fileName);
|
||||||
QDir dir(fi.absoluteDir());
|
QDir dir(fi.absoluteDir());
|
||||||
|
@ -47,6 +47,8 @@ private:
|
|||||||
const Projection &proj, const Transform &transform)
|
const Projection &proj, const Transform &transform)
|
||||||
: zoom(zoom), tileSize(tileSize), size(size), projection(proj),
|
: zoom(zoom), tileSize(tileSize), size(size), projection(proj),
|
||||||
transform(transform) {}
|
transform(transform) {}
|
||||||
|
bool operator<(const Zoom &other) const
|
||||||
|
{return zoom < other.zoom;}
|
||||||
|
|
||||||
int zoom;
|
int zoom;
|
||||||
QSize tileSize;
|
QSize tileSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user