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