mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 20:02:48 +00:00
user selection preserved through undo/redo
This commit is contained in:
parent
e95a24f281
commit
c3cc910e0e
5 changed files with 7 additions and 13 deletions
|
@ -195,6 +195,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
l.tag = tag;
|
||||
l.updateneeded = true;
|
||||
if(fields != null) l.MakeFields(fields);
|
||||
l.selected = selected;
|
||||
}
|
||||
|
||||
// This attaches a sidedef on the front
|
||||
|
|
|
@ -156,17 +156,15 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
// Make new vertex
|
||||
v.Clone = newset.CreateVertex(v.X, v.Y);
|
||||
v.CopyPropertiesTo(v.Clone);
|
||||
}
|
||||
|
||||
// Go for all sectors
|
||||
foreach(Sector s in sectors)
|
||||
{
|
||||
// Make new sector
|
||||
Sector ns = newset.CreateSector();
|
||||
s.Clone = ns;
|
||||
|
||||
// Copy properties
|
||||
s.CopyPropertiesTo(ns);
|
||||
s.Clone = newset.CreateSector();
|
||||
s.CopyPropertiesTo(s.Clone);
|
||||
}
|
||||
|
||||
// Go for all linedefs
|
||||
|
@ -174,8 +172,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
// Make new linedef
|
||||
nl = newset.CreateLinedef(l.Start.Clone, l.End.Clone);
|
||||
|
||||
// Copy properties
|
||||
l.CopyPropertiesTo(nl);
|
||||
|
||||
// Linedef has a front side?
|
||||
|
@ -183,8 +179,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
// Make new sidedef
|
||||
nd = newset.CreateSidedef(nl, true, l.Front.Sector.Clone);
|
||||
|
||||
// Copy properties
|
||||
l.Front.CopyPropertiesTo(nd);
|
||||
}
|
||||
|
||||
|
@ -193,8 +187,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
// Make new sidedef
|
||||
nd = newset.CreateSidedef(nl, false, l.Back.Sector.Clone);
|
||||
|
||||
// Copy properties
|
||||
l.Back.CopyPropertiesTo(nd);
|
||||
}
|
||||
}
|
||||
|
@ -204,8 +196,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
// Make new thing
|
||||
Thing nt = newset.CreateThing();
|
||||
|
||||
// Copy properties
|
||||
t.CopyPropertiesTo(nt);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,6 +170,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
s.tag = tag;
|
||||
s.brightness = brightness;
|
||||
if(fields != null) s.MakeFields(fields);
|
||||
s.selected = selected;
|
||||
}
|
||||
|
||||
// This attaches a sidedef and returns the listitem
|
||||
|
|
|
@ -162,6 +162,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
t.iconoffset = iconoffset;
|
||||
args.CopyTo(t.args, 0);
|
||||
if(fields != null) t.MakeFields(fields);
|
||||
t.selected = selected;
|
||||
}
|
||||
|
||||
// This determines which sector the thing is in and links it
|
||||
|
|
|
@ -178,6 +178,7 @@ namespace CodeImp.DoomBuilder.Map
|
|||
v.y = y;
|
||||
v.pos = pos;
|
||||
if(fields != null) v.MakeFields(fields);
|
||||
v.selected = selected;
|
||||
}
|
||||
|
||||
// This returns the distance from given coordinates
|
||||
|
|
Loading…
Reference in a new issue