mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 20:33:09 +02:00
Fix 'Import Entities' causing error when cancelling
This commit is contained in:
parent
6db8239d8a
commit
9a2af26906
1 changed files with 5 additions and 2 deletions
|
@ -1277,9 +1277,12 @@ function handeMenuEvent(menuItem) {
|
||||||
}
|
}
|
||||||
} else if (menuItem == "Import Entities" || menuItem == "Import Entities from URL") {
|
} else if (menuItem == "Import Entities" || menuItem == "Import Entities from URL") {
|
||||||
|
|
||||||
var importURL;
|
var importURL = null;
|
||||||
if (menuItem == "Import Entities") {
|
if (menuItem == "Import Entities") {
|
||||||
importURL = "file:///" + Window.browse("Select models to import", "", "*.json");
|
var fullPath = Window.browse("Select models to import", "", "*.json");
|
||||||
|
if (fullPath) {
|
||||||
|
importURL = "file:///" + fullPath;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
importURL = Window.prompt("URL of SVO to import", "");
|
importURL = Window.prompt("URL of SVO to import", "");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue