[ui] convert string paths to urls outside Viewers

* fix external image drop on 2D Viewer
* fix 3D model loading from "Load Model" button
This commit is contained in:
Yann Lanthony 2018-03-09 18:46:35 +01:00
parent ccab9cb663
commit 266f0985d2
4 changed files with 11 additions and 26 deletions

View file

@ -8,7 +8,7 @@ FocusScope {
id: root
clip: true
property string source
property url source
property var metadata
// slots
@ -49,7 +49,7 @@ FocusScope {
fillMode: Image.PreserveAspectFit
autoTransform: true
onWidthChanged: if(status==Image.Ready) fit()
source: Filepath.stringToUrl(root.source)
source: root.source
onStatusChanged: {
// update cache source when image is loaded
if(status === Image.Ready)