Index: src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Commands/MapZoomInUsingRectangleCommand.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Commands/MapZoomInUsingRectangleCommand.cs (.../MapZoomInUsingRectangleCommand.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/DeltaShell/DeltaShell.Plugins.SharpMapGis.Gui/Commands/MapZoomInUsingRectangleCommand.cs (.../MapZoomInUsingRectangleCommand.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -5,19 +5,19 @@ { public class MapZoomInUsingRectangleCommand : MapViewCommand { - protected override void OnExecute(params object[] arguments) - { - var activeView = SharpMapGisGuiPlugin.GetFocusedMapView(); - activeView.MapControl.ActivateTool(CurrentTool); - base.OnExecute(arguments); - } protected override IMapTool CurrentTool { - get + get { return MapView != null ? MapView.MapControl.GetToolByType() : null; } } + protected override void OnExecute(params object[] arguments) + { + var activeView = SharpMapGisGuiPlugin.GetFocusedMapView(); + activeView.MapControl.ActivateTool(CurrentTool); + base.OnExecute(arguments); + } } } \ No newline at end of file