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:
parent
f0dee9d657
commit
760b7d8ec2
@ -66,9 +66,10 @@ qreal DEM::elevation(const Coordinates &c)
|
|||||||
QMap<Key, QByteArray>::const_iterator it(_data.find(k));
|
QMap<Key, QByteArray>::const_iterator it(_data.find(k));
|
||||||
if (it == _data.constEnd()) {
|
if (it == _data.constEnd()) {
|
||||||
QFile file(fileName(k));
|
QFile file(fileName(k));
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
|
_data.insert(k, QByteArray());
|
||||||
return NAN;
|
return NAN;
|
||||||
else {
|
} else {
|
||||||
it = _data.insert(k, file.readAll());
|
it = _data.insert(k, file.readAll());
|
||||||
return height(c, *it);
|
return height(c, *it);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user