Fixed a crash when manually modifying a sidedef's sector index to a sector with a tag

This commit is contained in:
biwa 2019-09-17 20:22:51 +02:00
parent 64c04f4246
commit e799d882a9

View file

@ -821,7 +821,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(General.Interface.IsActiveWindow)
{
// Show line edit dialog
General.Interface.OnEditFormValuesChanged += linedefEditForm_OnValuesChanged;
DialogResult result = General.Interface.ShowEditLinedefs(selected);
General.Interface.OnEditFormValuesChanged -= linedefEditForm_OnValuesChanged;
General.Map.Map.Update();
// When a single line was selected, deselect it now
@ -835,6 +838,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Update entire display
SetupSectorLabels();
General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd
UpdateSelectionInfo(); //mxd
General.Interface.RedrawDisplay();
@ -847,6 +851,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
base.OnEditEnd();
}
private void linedefEditForm_OnValuesChanged(object sender, EventArgs e)
{
// This does nothing. It prevents automatic OnRedrawDisplay when closing the linedef edit form
// Required to prevent crash from issue #298
}
//mxd
public override void OnUndoEnd()
{