mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 02:12:53 +02:00
Fix FST models being copied improperly in the ModelCache
This commit is contained in:
parent
4f3d593d90
commit
7ad8b3a610
1 changed files with 5 additions and 1 deletions
|
@ -394,7 +394,11 @@ QSharedPointer<Resource> ModelCache::createResource(const QUrl& url) {
|
|||
}
|
||||
|
||||
QSharedPointer<Resource> ModelCache::createResourceCopy(const QSharedPointer<Resource>& resource) {
|
||||
return QSharedPointer<Resource>(new GeometryDefinitionResource(*resource.staticCast<GeometryDefinitionResource>()), &Resource::deleter);
|
||||
if (resource->getURL().path().toLower().endsWith(".fst")) {
|
||||
return QSharedPointer<Resource>(new GeometryMappingResource(*resource.staticCast<GeometryMappingResource>()), &Resource::deleter);
|
||||
} else {
|
||||
return QSharedPointer<Resource>(new GeometryDefinitionResource(*resource.staticCast<GeometryDefinitionResource>()), &Resource::deleter);
|
||||
}
|
||||
}
|
||||
|
||||
GeometryResource::Pointer ModelCache::getGeometryResource(const QUrl& url,
|
||||
|
|
Loading…
Reference in a new issue