mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
UDBScript: fixed a bug where changing a thing's or linedef's arguments did not recorded for the undo system
This commit is contained in:
parent
8536eb1d95
commit
8274321cf1
1 changed files with 12 additions and 2 deletions
|
@ -51,8 +51,18 @@ namespace CodeImp.DoomBuilder.UDBScript.Wrapper
|
|||
}
|
||||
set
|
||||
{
|
||||
if (element is Thing) ((Thing)element).Args[i] = value;
|
||||
else if (element is Linedef) ((Linedef)element).Args[i] = value;
|
||||
if (element is Thing)
|
||||
{
|
||||
// We're not directly changing the fields, but apparently that's the only way to record the changes for the undo system
|
||||
((Thing)element).Fields.BeforeFieldsChange();
|
||||
((Thing)element).Args[i] = value;
|
||||
}
|
||||
else if (element is Linedef)
|
||||
{
|
||||
// We're not directly changing the fields, but apparently that's the only way to record the changes for the undo system
|
||||
((Linedef)element).Fields.BeforeFieldsChange();
|
||||
((Linedef)element).Args[i] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue