mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed: removing a thing should also remove it from the visible things list. (reported by DOOMGABR)
This commit is contained in:
parent
36af342423
commit
dceeed6bee
1 changed files with 8 additions and 2 deletions
|
@ -3139,7 +3139,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
PreAction(UndoGroup.None);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, true);
|
||||
foreach(IVisualEventReceiver i in objs) i.OnDelete();
|
||||
foreach (IVisualEventReceiver i in objs)
|
||||
{
|
||||
if (i is BaseVisualThing)
|
||||
visiblethings.Remove(((BaseVisualThing)i).Thing); // [ZZ] if any
|
||||
i.OnDelete();
|
||||
}
|
||||
PostAction();
|
||||
|
||||
ClearSelection();
|
||||
|
@ -3178,6 +3183,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(IVisualEventReceiver i in objs)
|
||||
{
|
||||
BaseVisualThing thing = (BaseVisualThing)i;
|
||||
visiblethings.Remove(thing.Thing); // [ZZ] if any
|
||||
thing.Thing.Fields.BeforeFieldsChange();
|
||||
thing.Thing.Dispose();
|
||||
thing.Dispose();
|
||||
|
|
Loading…
Reference in a new issue