user selection preserved through undo/redo

This commit is contained in:
codeimp 2008-05-01 14:18:04 +00:00
parent e95a24f281
commit c3cc910e0e
5 changed files with 7 additions and 13 deletions

View file

@ -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

View file

@ -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);
}

View file

@ -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

View file

@ -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

View file

@ -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