Fix Model setURL with delayload

Without this condition the model stays in a state where the geometry
  is downloaded but not referenced
That way, another call to setURL with update the geometry reference
instead of returning.
This commit is contained in:
Atlante45 2015-04-28 17:02:32 +02:00
parent 90c47a6046
commit 4911aa58bc

View file

@ -1047,7 +1047,7 @@ int Model::getLastFreeJointIndex(int jointIndex) const {
void Model::setURL(const QUrl& url, const QUrl& fallback, bool retainCurrent, bool delayLoad) { void Model::setURL(const QUrl& url, const QUrl& fallback, bool retainCurrent, bool delayLoad) {
// don't recreate the geometry if it's the same URL // don't recreate the geometry if it's the same URL
if (_url == url) { if (_url == url && _geometry && _geometry->getURL() == url) {
return; return;
} }
_url = url; _url = url;