mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 14:33:06 +02:00
Merge pull request #11622 from ctrlaltdavid/21572
Fix importing entities from URL
This commit is contained in:
commit
7b2dbc34dc
1 changed files with 11 additions and 2 deletions
|
@ -1476,10 +1476,19 @@ function onFileSaveChanged(filename) {
|
||||||
|
|
||||||
function onFileOpenChanged(filename) {
|
function onFileOpenChanged(filename) {
|
||||||
// disconnect the event, otherwise the requests will stack up
|
// disconnect the event, otherwise the requests will stack up
|
||||||
Window.openFileChanged.disconnect(onFileOpenChanged);
|
try {
|
||||||
|
// Not all calls to onFileOpenChanged() connect an event.
|
||||||
|
Window.openFileChanged.disconnect(onFileOpenChanged);
|
||||||
|
} catch (e) {
|
||||||
|
// Ignore.
|
||||||
|
}
|
||||||
|
|
||||||
var importURL = null;
|
var importURL = null;
|
||||||
if (filename !== "") {
|
if (filename !== "") {
|
||||||
importURL = "file:///" + filename;
|
importURL = filename;
|
||||||
|
if (!/^(http|https):\/\//.test(filename)) {
|
||||||
|
importURL = "file:///" + importURL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (importURL) {
|
if (importURL) {
|
||||||
if (!isActive && (Entities.canRez() && Entities.canRezTmp())) {
|
if (!isActive && (Entities.canRez() && Entities.canRezTmp())) {
|
||||||
|
|
Loading…
Reference in a new issue