1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Do not try to repeatedly open a missing DEM file

This commit is contained in:
Martin Tůma 2019-01-06 21:15:49 +01:00
parent f0dee9d657
commit 760b7d8ec2

View File

@ -66,9 +66,10 @@ qreal DEM::elevation(const Coordinates &c)
QMap<Key, QByteArray>::const_iterator it(_data.find(k));
if (it == _data.constEnd()) {
QFile file(fileName(k));
if (!file.open(QIODevice::ReadOnly))
if (!file.open(QIODevice::ReadOnly)) {
_data.insert(k, QByteArray());
return NAN;
else {
} else {
it = _data.insert(k, file.readAll());
return height(c, *it);
}