1
0
mirror of synced 2024-12-01 02:27:22 +01:00

Fix property grid updating

This commit is contained in:
KillzXGaming 2019-06-14 20:38:27 -04:00
parent c756089aad
commit b231df5d15
7 changed files with 3 additions and 8 deletions

Binary file not shown.

View File

@ -762,7 +762,7 @@ namespace Bfres.Structs
LibraryGUI.Instance.LoadEditor(editor); LibraryGUI.Instance.LoadEditor(editor);
} }
editor.Text = Text; editor.Text = Text;
editor.LoadProperties(this.texture); editor.LoadProperties(this.texture, OnPropertyChanged);
editor.LoadImage(this); editor.LoadImage(this);
if (texture.UserData != null) if (texture.UserData != null)
@ -780,18 +780,12 @@ namespace Bfres.Structs
private void OnPropertyChanged() private void OnPropertyChanged()
{ {
Text = texture.Name; texture.Name = Text;
RedChannel = GX2ChanneToGeneric(texture.CompSelR); RedChannel = GX2ChanneToGeneric(texture.CompSelR);
GreenChannel = GX2ChanneToGeneric(texture.CompSelG); GreenChannel = GX2ChanneToGeneric(texture.CompSelG);
BlueChannel = GX2ChanneToGeneric(texture.CompSelB); BlueChannel = GX2ChanneToGeneric(texture.CompSelB);
AlphaChannel = GX2ChanneToGeneric(texture.CompSelA); AlphaChannel = GX2ChanneToGeneric(texture.CompSelA);
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.Instance.GetActiveContent(typeof(ImageEditorBase));
if (editor != null)
{
editor.UpdateMipDisplay();
}
} }
} }
} }

View File

@ -39,6 +39,7 @@
this.propertyGrid1.Size = new System.Drawing.Size(613, 532); this.propertyGrid1.Size = new System.Drawing.Size(613, 532);
this.propertyGrid1.TabIndex = 0; this.propertyGrid1.TabIndex = 0;
this.propertyGrid1.ToolbarVisible = false; this.propertyGrid1.ToolbarVisible = false;
this.propertyGrid1.PropertyValueChanged += propertyGrid1_PropertyValueChanged;
// //
// STPropertyGrid // STPropertyGrid
// //