diff options
Diffstat (limited to 'editorlib/qml/PluginMain.qml')
-rw-r--r-- | editorlib/qml/PluginMain.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editorlib/qml/PluginMain.qml b/editorlib/qml/PluginMain.qml index 5570c4b..2c0777f 100644 --- a/editorlib/qml/PluginMain.qml +++ b/editorlib/qml/PluginMain.qml @@ -29,6 +29,15 @@ import QtQuick 2.5 Rectangle { color: editorContent.paneBackgroundColor + property url previouslyLoadedUrl: "" + + function loadScene(url) { + if (url !== previouslyLoadedUrl) { + var folder = url.toString(); + folder = decodeURIComponent(folder.replace(/\/[^\/]*$/, "")); + editorContent.loadScene(url, folder) + } + } EditorContent { id: editorContent |