Fix sidedef part brightness fields for SRB2

This commit is contained in:
spherallic 2023-09-01 00:30:57 +02:00
parent 395243df3e
commit 3e13b6ccdf
2 changed files with 12 additions and 4 deletions

View file

@ -165,7 +165,7 @@ namespace CodeImp.DoomBuilder.Controls
if (preventchanges)
return;
((LinedefEditFormUDMF)ParentForm).MakeUndo();
((LinedefEditFormSRB2)ParentForm).MakeUndo();
// Reset the increment step for +++/---
light.ResetIncrementStep();
@ -208,7 +208,7 @@ namespace CodeImp.DoomBuilder.Controls
reset.Visible = (cbAbsolute.CheckState != CheckState.Unchecked || light.Text != "0");
General.Map.IsChanged = true;
((LinedefEditFormUDMF)ParentForm).ValuesChangedExternal();
((LinedefEditFormSRB2)ParentForm).ValuesChangedExternal();
}
private void cbAbsolute_CheckedChanged(object sender, EventArgs e)
@ -216,7 +216,7 @@ namespace CodeImp.DoomBuilder.Controls
if (preventchanges)
return;
((LinedefEditFormUDMF)ParentForm).MakeUndo();
((LinedefEditFormSRB2)ParentForm).MakeUndo();
if (cbAbsolute.Checked)
{
@ -242,7 +242,7 @@ namespace CodeImp.DoomBuilder.Controls
sd.Fields.Remove(fieldabsolutename);
}
((LinedefEditFormUDMF)ParentForm).ValuesChangedExternal();
((LinedefEditFormSRB2)ParentForm).ValuesChangedExternal();
}
#endregion

View file

@ -626,6 +626,14 @@ namespace CodeImp.DoomBuilder.Windows
}
}
/// <summary>
/// Runs the OnValuesChanged event. Use after updating properties from other controls.
/// </summary>
public void ValuesChangedExternal()
{
OnValuesChanged?.Invoke(this, EventArgs.Empty);
}
#endregion
#region ================== Events