1
0
mirror of synced 2024-11-12 02:00:50 +01:00

A few more bug fixes.

Reset menus when an image editor instance gets reloaded from bflim.
Parent check FMAA animation files.
This commit is contained in:
KillzXGaming 2019-09-27 18:28:17 -04:00
parent 7f8183ca2f
commit 83a9ae7395
4 changed files with 8 additions and 3 deletions

View File

@ -323,7 +323,7 @@ namespace Bfres.Structs
public override void OnClick(TreeView treeView) => UpdateEditor();
public void UpdateEditor(){
((BFRES)Parent.Parent.Parent).LoadEditors(this);
((BFRES)Parent?.Parent?.Parent)?.LoadEditors(this);
}
public ResFile GetResFile()

View File

@ -589,8 +589,6 @@ namespace Bfres.Structs
surf.swizzle = texture.Swizzle;
surf.numArray = texture.ArrayLength;
if (Tex2Swizzle != 0)
surf.mip_swizzle = Tex2Swizzle;

View File

@ -107,6 +107,7 @@ namespace FirstPlugin
form.Text = Text;
form.Dock = DockStyle.Fill;
form.ResetMenus();
form.AddFileContextEvent("Save", Save);
form.AddFileContextEvent("Replace", Replace);
form.LoadProperties(prop);

View File

@ -141,6 +141,12 @@ namespace Toolbox.Library.Forms
public bool ShowChannelEditor = true;
public void ResetMenus()
{
fileToolStripMenuItem.DropDownItems.Clear();
fileToolStripMenuItem.DropDownItems.Add(exportToolStripMenuItem);
}
public void AddFileContextEvent(string Name, EventHandler eventHandler, bool Checked = false)
{
if (Name == "Save")