Changeset 1758 for branches/alma


Ignore:
Timestamp:
06/18/10 19:00:13 (15 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (CAS2065)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: run sdplot and make sure the additional tool bar appears and works.

Put in Release Notes: No

Module(s): sdplot and ASAP plotter running on TkAgg

Description: A bit of refactoring (created a new method _newcasabar to load the additional tool bar)


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/python/asapplotter.py

    r1757 r1758  
    2222            self._visible = visible
    2323        self._plotter = self._newplotter(**kwargs)
    24         if self._visible and matplotlib.get_backend() == "TkAgg":
    25             from asap.casatoolbar import CustomToolbarTkAgg
    26             self._plotter.figmgr.casabar = CustomToolbarTkAgg(self)
     24        # additional tool bar
     25        self._plotter.figmgr.casabar=self._newcasabar()
    2726
    2827        self._panelling = None
     
    7069            from asap.asaplot import asaplot
    7170        return asaplot(**kwargs)
     71
     72    def _newcasabar(self):
     73        backend=matplotlib.get_backend()
     74        if self._visible and backend == "TkAgg":
     75            from asap.casatoolbar import CustomToolbarTkAgg
     76            return CustomToolbarTkAgg(self)
     77        else: return None
    7278
    7379    #@print_log_dec
Note: See TracChangeset for help on using the changeset viewer.