Log Message: |
Popup menu for legend. Scheduled for the 1.2 release this was too
simple to implement: The popup menu is bound to the legend tree, while
the events are hanlded by its anchestor, the legend panel. This
allows reuse of all the event handlers already implemented for the
legend toolbar buttons.
* Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
to add handlers for the events issued by the popup menu.
(LegendPanel._OnToggleVisibility): Handler for toggling layer
visibility event
(LegendPanel._OnProjection): Handler for layer projection event.
(LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
(LegendTree._OnRightClick): Event handler for right click, select item
and pop up menu.
(LegendTree.ToggleVisibility): Toggle layer visibility
(LegendTree.LayerProjection): Raise layer projection dialog for
current layer.
|