On Mon, May 10, 2010 at 9:03 AM, Adam Ratcliffe <[email protected]> wrote: > I've taken the approach of creating an Ext.ButtonGroup that contains > my layer-specific actions which I add to the MapPanel toolbar. I store > a reference to this button group on the layer object. When an item is > selected in the map legend (Ext.TreePanel) I remove the ButtonGroup > for the old layer (if it added one) and add the ButtonGroup for the > newly selected layer. I found that I needed to pass autoDestroy = > false to the Ext.Toolbar.remove() function and hide the removed > ButtonGroup manually in order to be able to re-use the component when > its layer was re-selected.
Sounds good to me. Thanks for the feedback on that. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
