diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 6f558c2e4b..81e8b7882c 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -1130,7 +1130,6 @@ OpenLayers.Map = OpenLayers.Class({ removeControl: function (control) { //make sure control is non-null and actually part of our map if ( (control) && (control == this.getControl(control.id)) ) { - control.deactivate(); if (control.div && (control.div.parentNode == this.viewPortDiv)) { this.viewPortDiv.removeChild(control.div); } diff --git a/tests/Control.html b/tests/Control.html index ec0931a6b3..6bf6966258 100644 --- a/tests/Control.html +++ b/tests/Control.html @@ -59,16 +59,6 @@ control2.destroy(); } - function test_Control_removeControl(t) { - t.plan(1); - var map = new OpenLayers.Map('map'); - var control = new OpenLayers.Control(); - map.addControl(control); - control.deactivate = function() { - t.ok(true, "Deactivate is called."); - }; - map.removeControl(control); - } function test_Control_destroy(t) { t.plan(3);