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
This commit is contained in:
@@ -207,7 +207,6 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
} else {
|
} else {
|
||||||
control.activate();
|
control.activate();
|
||||||
}
|
}
|
||||||
this.redraw();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var c;
|
var c;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
panel.redrawsCount = 0;
|
panel.redrawsCount = 0;
|
||||||
panel.activateControl(toggleControl);
|
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.");
|
panel.redrawsCount + " times.");
|
||||||
t.ok(toolControl.active && !anotherToolControl.active && toggleControl.active,
|
t.ok(toolControl.active && !anotherToolControl.active && toggleControl.active,
|
||||||
"activated the toggle control, which has no influence on the tool & togggle controls.");
|
"activated the toggle control, which has no influence on the tool & togggle controls.");
|
||||||
|
|||||||
Reference in New Issue
Block a user