diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs index e450e4d..98f6ed6 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs @@ -632,16 +632,13 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd private void SelectNeighbourSideParts(Sidedef side, Rectangle sourcerect, bool select, bool matchtexture, bool matchheight, bool forward) { - if (side.Line.Marked) - return; - BaseVisualSector s = (BaseVisualSector)mode.GetVisualSector(side.Sector); if(s != null) { VisualSidedefParts parts = s.GetSidedefParts(side); + SelectNeighbourSidePart(parts.lower, sourcerect, select, matchtexture, matchheight, forward); SelectNeighbourSidePart(parts.middlesingle, sourcerect, select, matchtexture, matchheight, forward); - SelectNeighbourSidePart(parts.middledouble, sourcerect, select, matchtexture, matchheight, forward); SelectNeighbourSidePart(parts.upper, sourcerect, select, matchtexture, matchheight, forward); if(parts.middle3d != null) @@ -649,6 +646,12 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(VisualMiddle3D middle3D in parts.middle3d) SelectNeighbourSidePart(middle3D, sourcerect, select, matchtexture, matchheight, forward); } + + // hack to prevent midtexture selection wrapping arround + if (side.Line.Marked) + return; + + SelectNeighbourSidePart(parts.middledouble, sourcerect, select, matchtexture, matchheight, forward); } }