mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 22:46:19 +01:00
- Fix crash when trying to load an already opened project while opening multiple projects.
This commit is contained in:
parent
94330dd272
commit
18dc64fbfd
1 changed files with 6 additions and 2 deletions
|
@ -22,8 +22,12 @@ function TEST_PATH(path) { #region
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
function LOAD_PATH(path, readonly = false, safe_mode = false) { #region
|
function LOAD_PATH(path, readonly = false, safe_mode = false) { #region
|
||||||
for( var i = 0, n = array_length(PROJECTS); i < n; i++ )
|
for( var i = array_length(PROJECTS) - 1; i >= 0; i-- ) {
|
||||||
if(PROJECTS[i].path == path) closeProject(PROJECTS[i]);
|
var _p = array_safe_get_fast(PROJECTS, i);
|
||||||
|
if(!is_instanceof(_p, Project)) continue;
|
||||||
|
|
||||||
|
if(_p.path == path) closeProject(_p);
|
||||||
|
}
|
||||||
|
|
||||||
var _PROJECT = PROJECT;
|
var _PROJECT = PROJECT;
|
||||||
PROJECT = new Project();
|
PROJECT = new Project();
|
||||||
|
|
Loading…
Reference in a new issue