Fixed Overlays::isLoaded which did not to find my just created overlay.

This commit is contained in:
Thijs Wenker 2014-11-13 23:29:05 +01:00
parent 388332966d
commit cbb3d463b6

View file

@ -359,14 +359,14 @@ void RayToOverlayIntersectionResultFromScriptValue(const QScriptValue& object, R
bool Overlays::isLoaded(unsigned int id) {
QReadLocker lock(&_lock);
Overlay* overlay = _overlays2D.value(id);
if (!overlay) {
_overlays3D.value(id);
}
if (!overlay) {
Overlay* thisOverlay = NULL;
if (_overlays2D.contains(id)) {
thisOverlay = _overlays2D[id];
} else if (_overlays3D.contains(id)) {
thisOverlay = _overlays3D[id];
} else {
return false; // not found
}
return overlay->isLoaded();
return thisOverlay->isLoaded();
}