1
0
mirror of synced 2025-01-19 01:14:08 +01:00

Reset channel display when another image is clicked on

This commit is contained in:
KillzXGaming 2019-03-24 12:57:49 -04:00
parent 470b0ead75
commit 8a352111de
6 changed files with 11 additions and 7 deletions

Binary file not shown.

View File

@ -171,6 +171,8 @@ namespace Switch_Toolbox.Library.Forms
public void LoadImage(STGenericTexture texture)
{
ResetChannelEditor();
HasBeenEdited = false;
if (texture.CanEdit)
@ -179,8 +181,6 @@ namespace Switch_Toolbox.Library.Forms
adjustmentsToolStripMenuItem.Enabled = true;
}
propertiesEditor.Reset();
ActiveTexture = texture;
CurMipDisplayLevel = 0;
CurArrayDisplayLevel = 0;
@ -484,6 +484,12 @@ namespace Switch_Toolbox.Library.Forms
propertiesEditor.LoadImage(new Bitmap(bitmap), this);
}
private void ResetChannelEditor()
{
propertiesEditor.ResetChannels();
}
private void InvokeMethod()
{
}
@ -635,7 +641,6 @@ namespace Switch_Toolbox.Library.Forms
}
UpdateMipDisplay();
propertiesEditor.Reset();
}
private void resizeToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -72,11 +72,10 @@ namespace Switch_Toolbox.Library.Forms
public void OnPropertyChanged() { }
public void Reset()
public void ResetChannels()
{
// foreach (var page in tempPages)
// stTabControl1.TabPages.Remove(page);
imgList.Images.Clear();
channelListView.Refresh();
}
ImageEditorBase imageEditor;