From 34366204ecfd4a728de23ef2b1d2470ff6559884 Mon Sep 17 00:00:00 2001 From: MattNL Date: Tue, 20 Sep 2022 11:42:12 -0400 Subject: [PATCH] Fixed ChangeTile not working --- PCK-Studio/MainForm.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 89bf307a..1c92b185 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -296,22 +296,22 @@ namespace PckStudio !file.filepath.EndsWith("clock.png") && !file.filepath.EndsWith("compass.png")) { if (IsPathMipMapped(file.filepath) && - currentPCK.Files.Find(pckfile => + currentPCK.Files.Find(pckfile => // todo write cleaner ? pckfile.filepath.Equals(file.filepath.Remove(file.filepath.Length - 16) + Path.GetExtension(file.filepath))) is PCKFile.FileData originalAnimationFile) - { + { file = originalAnimationFile; } - using (AnimationEditor animationEditor = new AnimationEditor(file)) - { - if (animationEditor.ShowDialog(this) == DialogResult.OK) + using (AnimationEditor animationEditor = new AnimationEditor(file)) + { + if (animationEditor.ShowDialog(this) == DialogResult.OK) { - saved = false; - ReloadMetaTreeView(); - } - } - } + file.filepath = animationEditor.TileName; + BuildMainTreeView(); + } + } + } } private void HandleGameRuleFile(PCKFile.FileData file)