mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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) {
|
||||
// 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;
|
||||
if (filename !== "") {
|
||||
importURL = "file:///" + filename;
|
||||
importURL = filename;
|
||||
if (!/^(http|https):\/\//.test(filename)) {
|
||||
importURL = "file:///" + importURL;
|
||||
}
|
||||
}
|
||||
if (importURL) {
|
||||
if (!isActive && (Entities.canRez() && Entities.canRezTmp())) {
|
||||
|
|
Loading…
Reference in a new issue