From a6b15433c8c81e42df5135231f957f3ec451c093 Mon Sep 17 00:00:00 2001 From: Fred Massin Date: Thu, 26 Oct 2017 09:37:58 -0600 Subject: [PATCH] Tiles without extension The mapprojection package stores tiles without extension. This change allow to use these tiles in the ipgp gui's. --- libs/ipgp/gui/map/tile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/ipgp/gui/map/tile.cpp b/libs/ipgp/gui/map/tile.cpp index 71fb8de..1f150b0 100644 --- a/libs/ipgp/gui/map/tile.cpp +++ b/libs/ipgp/gui/map/tile.cpp @@ -96,10 +96,13 @@ const int& Tile::z() const { // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> const QString Tile::path() const { + const QString noext = _path + suffix(); const QString png = _path + suffix() + ".png"; const QString jpg = _path + suffix() + ".jpg"; - if ( QFile::exists(png) ) + if ( QFile::exists(noext) ) + return noext; + else if ( QFile::exists(png) ) return png; else return jpg;