1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Improved error handling

This commit is contained in:
Martin Tůma 2018-10-26 18:47:34 +02:00
parent 9f3129f899
commit f6b1344ee2

View File

@ -249,8 +249,6 @@ bool WMTS::parseCapabilities(const QString &path, CTX &ctx)
return false; return false;
} }
createZooms(ctx);
if (!ctx.hasLayer) { if (!ctx.hasLayer) {
_errorString = ctx.setup.layer() + ": layer not provided"; _errorString = ctx.setup.layer() + ": layer not provided";
return false; return false;
@ -280,7 +278,8 @@ bool WMTS::parseCapabilities(const QString &path, CTX &ctx)
_errorString = ctx.crs + ": unknown CRS"; _errorString = ctx.crs + ": unknown CRS";
return false; return false;
} }
if (ctx.matrixes.isEmpty()) { createZooms(ctx);
if (_zooms.isEmpty()) {
_errorString = "No usable tile matrix found"; _errorString = "No usable tile matrix found";
return false; return false;
} }