mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 20:24:03 +02:00
Merge pull request #7527 from zzmp/fix/model-cache-delay
Fix model fetch delay
This commit is contained in:
commit
dc1d3a8ff5
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ void GeometryMappingResource::downloadFinished(const QByteArray& data) {
|
|||
GeometryExtra extra{ mapping, textureBaseUrl };
|
||||
|
||||
// Get the raw GeometryResource, not the wrapped NetworkGeometry
|
||||
_geometryResource = modelCache->getResource(url, QUrl(), true, &extra).staticCast<GeometryResource>();
|
||||
_geometryResource = modelCache->getResource(url, QUrl(), false, &extra).staticCast<GeometryResource>();
|
||||
|
||||
if (_geometryResource->isLoaded()) {
|
||||
onGeometryMappingLoaded(!_geometryResource->getURL().isEmpty());
|
||||
|
@ -226,7 +226,7 @@ QSharedPointer<Resource> ModelCache::createResource(const QUrl& url, const QShar
|
|||
std::shared_ptr<NetworkGeometry> ModelCache::getGeometry(const QUrl& url, const QVariantHash& mapping, const QUrl& textureBaseUrl) {
|
||||
GeometryExtra geometryExtra = { mapping, textureBaseUrl };
|
||||
GeometryResource::Pointer resource = getResource(url, QUrl(), true, &geometryExtra).staticCast<GeometryResource>();
|
||||
return std::make_shared<NetworkGeometry>(resource);
|
||||
return resource ? std::make_shared<NetworkGeometry>(resource) : NetworkGeometry::Pointer();
|
||||
}
|
||||
|
||||
const QVariantMap Geometry::getTextures() const {
|
||||
|
|
Loading…
Reference in a new issue