From c3c4ffcc7bb50f70c7867c358d4ae77803fff97e Mon Sep 17 00:00:00 2001 From: codeimp Date: Thu, 16 Sep 2010 13:13:17 +0000 Subject: [PATCH] @ Highlighting 3D floor/ceiling will now show the sector info of the control sector instead of the sector that the floor/ceiling is in. --- .../VisualModes/BaseVisualMode.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs index 48a7a101..39b37ff6 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs @@ -377,13 +377,23 @@ namespace CodeImp.DoomBuilder.GZDoomEditing if(target.picked is VisualGeometry) { VisualGeometry pickedgeo = (target.picked as VisualGeometry); - - if(pickedgeo.Sidedef != null) - General.Interface.ShowLinedefInfo(pickedgeo.Sidedef.Line); - else if(pickedgeo.Sidedef == null) - General.Interface.ShowSectorInfo(pickedgeo.Sector.Sector); + + // Sidedef? + if(pickedgeo is BaseVisualGeometrySidedef) + { + BaseVisualGeometrySidedef pickedsidedef = (pickedgeo as BaseVisualGeometrySidedef); + General.Interface.ShowLinedefInfo(pickedsidedef.Sidedef.Line); + } + // Sector? + else if(pickedgeo is BaseVisualGeometrySector) + { + BaseVisualGeometrySector pickedsector = (pickedgeo as BaseVisualGeometrySector); + General.Interface.ShowSectorInfo(pickedsector.Level.sector); + } else + { General.Interface.HideInfo(); + } } // Thing picked? if(target.picked is VisualThing)