From da1b842493078fec4f238601fa033d73075ca6f5 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Thu, 7 Feb 2019 19:55:05 +0100 Subject: [PATCH] [ui] MediaLibrary: enable dynamicRoles on mediaModel If an outside 3D media file is the first thing ever loaded, 'model.attribute' will be initialized to 'null' and will prevent an actual Attribute to be associated to this role. This breaks media loading from within Meshroom. --- meshroom/ui/qml/Viewer3D/MediaLibrary.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshroom/ui/qml/Viewer3D/MediaLibrary.qml b/meshroom/ui/qml/Viewer3D/MediaLibrary.qml index 57951a74..dd3ec84e 100644 --- a/meshroom/ui/qml/Viewer3D/MediaLibrary.qml +++ b/meshroom/ui/qml/Viewer3D/MediaLibrary.qml @@ -30,7 +30,7 @@ Entity { QtObject { id: m - property ListModel mediaModel: ListModel {} + property ListModel mediaModel: ListModel { dynamicRoles: true } property var sourceToEntity: ({}) readonly property var mediaElement: ({