From c70a97fb77a843cc6c4f69447195a4248936785a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 14 Sep 2010 07:30:28 +0000 Subject: [PATCH] Removing redundant redraw. This patch is an excellent example of how things should be done, well done jorix. p=jorix, r=me (closes #2837) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10734 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control/Panel.js | 1 - tests/Control/Panel.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/Panel.js b/lib/OpenLayers/Control/Panel.js index cccdf2a09a..24750b0011 100644 --- a/lib/OpenLayers/Control/Panel.js +++ b/lib/OpenLayers/Control/Panel.js @@ -207,7 +207,6 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, { } else { control.activate(); } - this.redraw(); return; } var c; diff --git a/tests/Control/Panel.html b/tests/Control/Panel.html index e52fed2617..2c3dd672d3 100644 --- a/tests/Control/Panel.html +++ b/tests/Control/Panel.html @@ -67,7 +67,7 @@ panel.redrawsCount = 0; panel.activateControl(toggleControl); - t.ok((panel.redrawsCount > 0),"Redraw called on activated toggle " + + t.eq(panel.redrawsCount, 1, "Redraw called on activated toggle " + panel.redrawsCount + " times."); t.ok(toolControl.active && !anotherToolControl.active && toggleControl.active, "activated the toggle control, which has no influence on the tool & togggle controls.");