Fixed: autoaligning and limited floodfill didn't work for selection.

This commit is contained in:
ZZYZX 2017-01-29 04:56:00 +02:00 committed by sphere
parent c677627c09
commit 525bb7e3a2

View file

@ -1052,7 +1052,30 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Limit the alignment to selection only
General.Map.Map.ClearMarkedSidedefs(true);
List<Sidedef> sides = mode.GetSelectedSidedefs();
foreach(Sidedef sd in sides) sd.Marked = false;
foreach (Sidedef sd in sides)
{
sd.Marked = false;
if (sd.Other != null)
sd.Other.Marked = false;
}
}
//mxd. We potentially need to deal with 2 textures (because of long and short texture names)...
HashSet<long> texturehashes = new HashSet<long> { Texture.LongName };
switch(this.GeometryType)
{
case VisualGeometryType.WALL_LOWER:
texturehashes.Add(Sidedef.LongLowTexture);
break;
case VisualGeometryType.WALL_MIDDLE:
case VisualGeometryType.WALL_MIDDLE_3D:
texturehashes.Add(Sidedef.LongMiddleTexture);
break;
case VisualGeometryType.WALL_UPPER:
texturehashes.Add(Sidedef.LongHighTexture);
break;
}
// Do the alignment
@ -1104,7 +1127,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Limit the alignment to selection only
General.Map.Map.ClearMarkedSidedefs(true);
List<Sidedef> sides = mode.GetSelectedSidedefs();
foreach(Sidedef sd in sides) sd.Marked = false;
foreach (Sidedef sd in sides)
{
sd.Marked = false;
if (sd.Other != null)
sd.Other.Marked = false;
}
}
// Do the alignment