Browse Source

Missing setCurrent()

trethaller 6 năm trước cách đây
mục cha
commit
e903f813c2
2 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 1 0
      hide/prefab/EditContext.hx
  2. 1 0
      hide/prefab/fx/AnimEvent.hx

+ 1 - 0
hide/prefab/EditContext.hx

@@ -16,6 +16,7 @@ class EditContext {
 	function get_ide() return hide.Ide.inst;
 	public function onChange(p : Prefab, propName : String) {
 		var ctx = getContext(p);
+		scene.setCurrent();
 		if(ctx != null) {
 			p.updateInstance(ctx, propName);
 			var parent = p.parent;

+ 1 - 0
hide/prefab/fx/AnimEvent.hx

@@ -80,6 +80,7 @@ class AnimEvent extends hide.prefab.fx.Event {
 			if( animation != null )
 				select.val(animation);
 			select.change(function(_) {
+				ctx.scene.setCurrent();
 				var v = select.val();
 				var prev = animation;
 				if( v == "" ) {