소스 검색

fix : prevent reopen start args

Nicolas Cannasse 7 년 전
부모
커밋
50749fd327
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      hide/ui/Ide.hx

+ 6 - 1
hide/ui/Ide.hx

@@ -37,6 +37,8 @@ class Ide {
 
 
 	var renderers : Array<h3d.mat.MaterialSetup>;
 	var renderers : Array<h3d.mat.MaterialSetup>;
 
 
+	static var firstInit = true;
+
 	function new() {
 	function new() {
 		inst = this;
 		inst = this;
 		window = nw.Window.get();
 		window = nw.Window.get();
@@ -175,10 +177,13 @@ class Ide {
 		haxe.Timer.delay(function() {
 		haxe.Timer.delay(function() {
 			initializing = false;
 			initializing = false;
 			if( layout.isInitialised ) {
 			if( layout.isInitialised ) {
-				for( file in nw.App.argv ) {
+				if( firstInit ) {
+					firstInit = false;
+					for( file in nw.App.argv ) {
 						if( !sys.FileSystem.exists(file) ) continue;
 						if( !sys.FileSystem.exists(file) ) continue;
 						openFile(file);
 						openFile(file);
 					}
 					}
+				}
 				return;
 				return;
 			}
 			}
 			state.state = [];
 			state.state = [];