Fix property grid updating
This commit is contained in:
parent
c756089aad
commit
b231df5d15
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -762,7 +762,7 @@ namespace Bfres.Structs
|
||||
LibraryGUI.Instance.LoadEditor(editor);
|
||||
}
|
||||
editor.Text = Text;
|
||||
editor.LoadProperties(this.texture);
|
||||
editor.LoadProperties(this.texture, OnPropertyChanged);
|
||||
editor.LoadImage(this);
|
||||
|
||||
if (texture.UserData != null)
|
||||
@ -780,18 +780,12 @@ namespace Bfres.Structs
|
||||
|
||||
private void OnPropertyChanged()
|
||||
{
|
||||
Text = texture.Name;
|
||||
texture.Name = Text;
|
||||
|
||||
RedChannel = GX2ChanneToGeneric(texture.CompSelR);
|
||||
GreenChannel = GX2ChanneToGeneric(texture.CompSelG);
|
||||
BlueChannel = GX2ChanneToGeneric(texture.CompSelB);
|
||||
AlphaChannel = GX2ChanneToGeneric(texture.CompSelA);
|
||||
|
||||
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.Instance.GetActiveContent(typeof(ImageEditorBase));
|
||||
if (editor != null)
|
||||
{
|
||||
editor.UpdateMipDisplay();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -39,6 +39,7 @@
|
||||
this.propertyGrid1.Size = new System.Drawing.Size(613, 532);
|
||||
this.propertyGrid1.TabIndex = 0;
|
||||
this.propertyGrid1.ToolbarVisible = false;
|
||||
this.propertyGrid1.PropertyValueChanged += propertyGrid1_PropertyValueChanged;
|
||||
//
|
||||
// STPropertyGrid
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user