Fixed a crash that happened when entering Edit Selection Mode while performing the Edit action

This commit is contained in:
biwa 2020-04-30 20:22:26 +02:00 committed by spherallic
parent 71fd3df676
commit 997c8ebef3

View file

@ -1219,10 +1219,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
public override void OnEngage()
{
base.OnEngage();
autodrag = (pasting && mouseinside && BuilderPlug.Me.AutoDragOnPaste);
snaptonearest = General.Interface.AutoMerge; //mxd
autodrag = (pasting && mouseinside && BuilderPlug.Me.AutoDragOnPaste);
snaptonearest = General.Interface.AutoMerge; //mxd
selectedsectors = new Dictionary<Sector, SectorTextureInfo>(); //mxd
// Add toolbar buttons
General.Interface.AddButton(BuilderPlug.Me.MenusForm.FlipSelectionH);
General.Interface.AddButton(BuilderPlug.Me.MenusForm.FlipSelectionV);
@ -1250,7 +1251,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
ICollection<Vertex> verts = General.Map.Map.GetVerticesFromLinesMarks(true);
foreach(Vertex v in verts) v.Marked = true;
ICollection<Sector> sectors = General.Map.Map.GetSelectedSectors(true); //mxd
selectedsectors = new Dictionary<Sector, SectorTextureInfo>(); //mxd
foreach(Sector s in sectors)
{
foreach(Sidedef sd in s.Sidedefs)