mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-01-30 20:50:41 +00:00
Fixed: removing a thing should also remove it from the visible things list. (reported by DOOMGABR)
This commit is contained in:
parent
505865d135
commit
2eb454ae07
1 changed files with 8 additions and 2 deletions
|
@ -3382,7 +3382,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();
|
||||
|
@ -3421,6 +3426,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