Ver Fonte

Fix animation events not saved.
Put refresh at the end of the save process.

borisrp há 1 semana atrás
pai
commit
de144f3ded
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      hide/view/Model.hx

+ 3 - 1
hide/view/Model.hx

@@ -264,6 +264,7 @@ class Model extends FileView {
 
 		if(!modified) return;
 
+		var needRefresh = false;
 		// Save render props
 		if (Ide.inst.currentConfig.get("sceneeditor.renderprops.edit", false) && sceneEditor.renderPropsRoot != null)
 			sceneEditor.renderPropsRoot.save();
@@ -326,7 +327,7 @@ class Model extends FileView {
 				var path = state.path;
 				lfs.removePathFromCache(path);
 				@:privateAccess hxd.res.Loader.currentInstance.cache.remove(path);
-				onRefresh();
+				needRefresh = true;
 			}
 		}
 
@@ -348,6 +349,7 @@ class Model extends FileView {
 		}
 
 		super.save();
+		if(needRefresh) onRefresh();
 	}
 
 	override function onFileChanged( wasDeleted : Bool, rebuildView = true ) {