diff --git a/File_Format_Library/FileFormats/Texture/BFLIM.cs b/File_Format_Library/FileFormats/Texture/BFLIM.cs index 091d632f..a0f787fd 100644 --- a/File_Format_Library/FileFormats/Texture/BFLIM.cs +++ b/File_Format_Library/FileFormats/Texture/BFLIM.cs @@ -92,6 +92,8 @@ namespace FirstPlugin private void UpdateForm(ImageEditorBase form) { + if (form == null) return; + if (image != null) { Properties prop = new Properties(); @@ -332,6 +334,9 @@ namespace FirstPlugin LoadComponents(Format, ftex.UseBc4Alpha); + if (RenderableTex != null) //Reload bflim in opengl if used + LoadOpenGLTexture(); + UpdateForm(); } } diff --git a/File_Format_Library/GUI/BFLYT/LayoutTextureList.cs b/File_Format_Library/GUI/BFLYT/LayoutTextureList.cs index 68fb1b7e..06268733 100644 --- a/File_Format_Library/GUI/BFLYT/LayoutTextureList.cs +++ b/File_Format_Library/GUI/BFLYT/LayoutTextureList.cs @@ -374,9 +374,15 @@ namespace LayoutBXLYT if (texture == null) return; + Console.WriteLine("texture edited!"); + TextureList[textName] = texture; //Update the icon by reloading all of them + + Console.WriteLine("LoadTextures!"); LoadTextures(ParentEditor, ActiveLayout, TextureList); + Console.WriteLine("FIN!"); + } }