mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
fixed crash on merging sectors together in which case one of the sectors only has lines adjacent to the others
This commit is contained in:
parent
07113b5442
commit
3067dac119
1 changed files with 8 additions and 2 deletions
|
@ -122,9 +122,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
|
||||
// Find the first sector that is not disposed
|
||||
Sector first = null;
|
||||
foreach(Sector s in orderedselection)
|
||||
if(!s.IsDisposed) { first = s; break; }
|
||||
|
||||
// Join all selected sectors with the first
|
||||
for(int i = 1; i < orderedselection.Count; i++)
|
||||
orderedselection[i].Join(orderedselection[0]);
|
||||
for(int i = 0; i < orderedselection.Count; i++)
|
||||
if((orderedselection[i] != first) && !orderedselection[i].IsDisposed)
|
||||
orderedselection[i].Join(first);
|
||||
}
|
||||
|
||||
// This highlights a new item
|
||||
|
|
Loading…
Reference in a new issue