Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs =================================================================== diff -u -r6dd2fa9ca7d2c786245b25d61f6f28a90c5bce9f -rae895c281cca1d27cb3d968e895efec29d498699 --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision 6dd2fa9ca7d2c786245b25d61f6f28a90c5bce9f) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision ae895c281cca1d27cb3d968e895efec29d498699) @@ -491,20 +491,19 @@ private void TogglePanning() { - ResetDefaultInteraction(); + map.FunctionMode = FunctionMode.Pan; isPanningEnabled = true; - - map.FunctionMode = FunctionMode.Pan; + isRectangleZoomingEnabled = false; } private void ToggleRectangleZooming() { - ResetDefaultInteraction(); + map.FunctionMode = FunctionMode.None; + map.ActivateMapFunction(mapFunctionSelectionZoom); + isPanningEnabled = false; isRectangleZoomingEnabled = true; - - map.ActivateMapFunction(mapFunctionSelectionZoom); } private void ToggleMouseCoordinatesVisibility() @@ -575,14 +574,6 @@ return layer.IsVisible && !layer.Extent.IsEmpty(); } - private void ResetDefaultInteraction() - { - isPanningEnabled = false; - isRectangleZoomingEnabled = false; - - map.FunctionMode = FunctionMode.None; - } - private void MapFunctionActivateFunction(object sender, EventArgs e) { map.Cursor = defaultCursor;