Added, Things mode: target tags are now automatically assigned when duplicating (shift-dragging) PatrolPoints and InterpolationPoints.

Fixed, ThingsMode: fixed highlighted thing disappearing when using paste action while highlighting a thing.
This commit is contained in:
MaxED 2015-08-06 21:54:15 +00:00
parent b9b5b00213
commit 18af297d9d

View file

@ -566,6 +566,30 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
Thing clone = InsertThing(t.Position); Thing clone = InsertThing(t.Position);
t.CopyPropertiesTo(clone); t.CopyPropertiesTo(clone);
// If the cloned item is an interpolation point or patrol point, then insert the point in the path
ThingTypeInfo info = General.Map.Data.GetThingInfo(t.Type);
int nextpointtagargnum = -1;
// Thing type can be changed in MAPINFO DoomEdNums block...
switch (info.ClassName.ToLowerInvariant())
{
case "interpolationpoint":
nextpointtagargnum = 3;
break;
case "patrolpoint":
nextpointtagargnum = 0;
break;
}
// Apply changes?
if(nextpointtagargnum != -1)
{
if(t.Tag == 0) t.Tag = General.Map.Map.GetNewTag();
t.Args[nextpointtagargnum] = clone.Tag = General.Map.Map.GetNewTag();
}
t.Selected = false; t.Selected = false;
clone.Selected = true; clone.Selected = true;
} }
@ -682,6 +706,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
return base.OnCopyBegin(); return base.OnCopyBegin();
} }
//mxd. Needs more highlight management...
public override bool OnPasteBegin(PasteOptions options)
{
bool result = base.OnPasteBegin(options);
if(result && highlighted != null) highlighted.Highlighted = false;
return result;
}
//mxd //mxd
public override void UpdateSelectionInfo() public override void UpdateSelectionInfo()
{ {