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