Fixed: BaseVisualMode object was used before fully initialized (reported by Martix10)

This commit is contained in:
ZZYZX 2017-08-24 16:24:42 +03:00 committed by spherallic
parent 2eb454ae07
commit 2953dc8715

View file

@ -1294,8 +1294,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
// When entering this mode
public override void OnEngage()
{
base.OnEngage();
//mxd
useSelectionFromClassicMode = BuilderPlug.Me.SyncSelection ? !General.Interface.ShiftState : General.Interface.ShiftState;
if(useSelectionFromClassicMode) UpdateSelectionInfo();
@ -1312,7 +1310,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd. Update event lines
renderer.SetEventLines(LinksCollector.GetThingLinks(General.Map.ThingsFilter.VisibleThings, blockmap, bsp, useblockmap));
}
// [ZZ] this enables calling of this object from the outside world. Only after properly initialized pls.
base.OnEngage();
}
// When returning to another mode
public override void OnDisengage()