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

Fix srgb toggle for off for ftex

This commit is contained in:
KillzXGaming 2019-06-14 20:26:46 -04:00
parent 34f724a6e1
commit c756089aad
10 changed files with 21 additions and 5 deletions

Binary file not shown.

View File

@ -48,15 +48,20 @@ namespace Switch_Toolbox.Library.Forms
}
Action OnPropertyChanged;
public void LoadProperty(object selectedObject, Action onPropertyChanged)
Action OnPropertyChanged2;
public void LoadProperty(object selectedObject, Action onPropertyChanged = null, Action onPropertyChanged2 = null)
{
OnPropertyChanged = onPropertyChanged;
OnPropertyChanged2 = onPropertyChanged2;
propertyGrid1.SelectedObject = selectedObject;
}
private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
OnPropertyChanged();
OnPropertyChanged2();
}
}
}

View File

@ -97,6 +97,7 @@
this.stPropertyGrid1.ShowHintDisplay = true;
this.stPropertyGrid1.Size = new System.Drawing.Size(219, 508);
this.stPropertyGrid1.TabIndex = 0;
this.stPropertyGrid1.Load += new System.EventHandler(this.stPropertyGrid1_Load);
//
// tabPage1
//
@ -114,12 +115,12 @@
this.stChannelToolstripMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.replaceChannelToolStripMenuItem});
this.stChannelToolstripMenu.Name = "stChannelToolstripMenu";
this.stChannelToolstripMenu.Size = new System.Drawing.Size(181, 48);
this.stChannelToolstripMenu.Size = new System.Drawing.Size(163, 26);
//
// replaceChannelToolStripMenuItem
//
this.replaceChannelToolStripMenuItem.Name = "replaceChannelToolStripMenuItem";
this.replaceChannelToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.replaceChannelToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
this.replaceChannelToolStripMenuItem.Text = "Replace Channel";
this.replaceChannelToolStripMenuItem.Click += new System.EventHandler(this.replaceChannelToolStripMenuItem_Click);
//

View File

@ -73,17 +73,22 @@ namespace Switch_Toolbox.Library.Forms
stPropertyGrid1.Invoke(new MethodInvoker(
delegate ()
{
stPropertyGrid1.LoadProperty(prop, OnPropertyChanged);
stPropertyGrid1.LoadProperty(prop, OnPropertyChanged, OnPropertyEditorChanged);
stPropertyGrid1.Refresh();
}));
}
else
{
stPropertyGrid1.LoadProperty(prop, OnPropertyChanged);
stPropertyGrid1.LoadProperty(prop, OnPropertyChanged, OnPropertyEditorChanged);
stPropertyGrid1.Refresh();
}
}
private void OnPropertyEditorChanged()
{
imageEditor.UpdateMipDisplay();
}
public void UpdateProperties()
{
if (stPropertyGrid1.InvokeRequired)
@ -263,5 +268,10 @@ namespace Switch_Toolbox.Library.Forms
break;
}
}
private void stPropertyGrid1_Load(object sender, EventArgs e)
{
}
}
}