Browse Source

fix set allowInspect=false

Nicolas Cannasse 4 years ago
parent
commit
5d8a801ee0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      h2d/domkit/Style.hx

+ 5 - 1
h2d/domkit/Style.hx

@@ -127,7 +127,7 @@ class Style extends domkit.CssStyle {
 			var scenes = [];
 			for( o in currentObjects ) {
 				var s = o.getScene();
-				if( scenes.indexOf(o) >= 0 ) continue;
+				if( s == null || scenes.indexOf(s) >= 0 ) continue;
 				scenes.push(s);
 				function scanRec(o:h2d.Object) {
 					if( o.dom != null ) @:privateAccess o.dom.currentValues = null;
@@ -135,6 +135,10 @@ class Style extends domkit.CssStyle {
 				}
 				scanRec(s);
 			}
+			if( inspectModeActive ) {
+				inspectModeActive = false;
+				hxd.System.setNativeCursor(Default);
+			}
 		}
 		return allowInspect = b;
 	}