diff options
-rw-r--r-- | src/runtimerender/resourcemanager/Qt3DSRenderBufferManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtimerender/resourcemanager/Qt3DSRenderBufferManager.cpp b/src/runtimerender/resourcemanager/Qt3DSRenderBufferManager.cpp index 388ef1b..c52eb75 100644 --- a/src/runtimerender/resourcemanager/Qt3DSRenderBufferManager.cpp +++ b/src/runtimerender/resourcemanager/Qt3DSRenderBufferManager.cpp @@ -355,7 +355,12 @@ struct SBufferManager : public IBufferManager bool inBsdfMipmaps, bool flipCompressed) override { + // Remove schema and root from keys. To prevent loading twice file "qrc:///foo" and "foo" QString path = QString::fromLatin1(inSourcePath.c_str()); + path = QUrl(path).path(); + if (path.startsWith(QLatin1String("/"))) + path = path.right(path.length() - 1); + const bool inserted = m_reloadableTextures.contains(path); if (!inserted || (inserted && m_reloadableTextures[path]->m_initialized == false)) { if (!inserted) |