Przeglądaj źródła

fix : prevent reopen start args

Nicolas Cannasse 7 lat temu
rodzic
commit
50749fd327
1 zmienionych plików z 6 dodań i 1 usunięć
  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>;
 
+	static var firstInit = true;
+
 	function new() {
 		inst = this;
 		window = nw.Window.get();
@@ -175,10 +177,13 @@ class Ide {
 		haxe.Timer.delay(function() {
 			initializing = false;
 			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;
 						openFile(file);
 					}
+				}
 				return;
 			}
 			state.state = [];