Dynamically switching which layer the EditingToolbar controls produces crazy mouse-wheel-zoom problems. Zooming in/out one 'click' is normal, zooming in/out one click a 2nd time will double how far the zoom goes, a 3rd time will triple.. etc.

This sample code (i have a similar function for each raster layer) below will reproduce the problem. The bug is gone when I remove the last 4 lines where I add and remove the EditingToolbar.

Does anyone have any clue how to fix this mouse problem? I would like to keep this all on the same page and still be able to draw on whatever vector layer I want.

<pre><code>
var myRasterLayer = new OpenLayers.Layer.TMS("My Raster Layer", "/idMaps/evRack/", {        
        serviceVersion: '.', layername: '.', alpha: true,
        type: 'png', getURL: overlay_getTileURL 
});
myRasterLayer.events.register('loadstart', this, function() {
        vector1.setVisibility(false);
        vector2.setVisibility(false);
        vector3.setVisibility(true);
        map.removeControl(EditBar);
        EditBar = undefined;
        EditBar = new OpenLayers.Control.EditingToolbar(vector3);
        map.addControl(EditBar);
});
</code></pre>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Mouse-Wheel-Zoom-Problem-on-Layer-Switching-with-EditingToolbar-tp3303950p3303950.html">Mouse Wheel Zoom Problem on Layer Switching with EditingToolbar</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>