Visual Mode: fixed a bug where selected 3D floor tops/bottoms would appear to be selected after undo, but actually weren't selected anymore

This commit is contained in:
biwa 2020-10-23 20:56:50 +02:00
parent f91bf312fb
commit d92ab46838

View file

@ -362,7 +362,26 @@ namespace CodeImp.DoomBuilder.BuilderModes
BaseVisualSector bvs = (BaseVisualSector)vs.Value;
if((bvs.Floor != null) && bvs.Floor.Selected) selectedobjects.Add(bvs.Floor);
if((bvs.Ceiling != null) && bvs.Ceiling.Selected) selectedobjects.Add(bvs.Ceiling);
foreach(Sidedef sd in vs.Key.Sidedefs)
// Also check extra floors
if (bvs.ExtraFloors.Count > 0)
foreach (VisualFloor vf in bvs.ExtraFloors)
if (vf.Selected) selectedobjects.Add(vf);
if (bvs.ExtraBackFloors.Count > 0)
foreach (VisualFloor vf in bvs.ExtraBackFloors)
if (vf.Selected) selectedobjects.Add(vf);
// Also check extra ceilings
if (bvs.ExtraCeilings.Count > 0)
foreach (VisualCeiling vc in bvs.ExtraCeilings)
if (vc.Selected) selectedobjects.Add(vc);
if (bvs.ExtraBackCeilings.Count > 0)
foreach (VisualCeiling vc in bvs.ExtraBackCeilings)
if (vc.Selected) selectedobjects.Add(vc);
foreach (Sidedef sd in vs.Key.Sidedefs)
{
List<VisualGeometry> sidedefgeos = bvs.GetSidedefGeometry(sd);
foreach(VisualGeometry sdg in sidedefgeos)