Ignore:
Timestamp:
05/18/12 19:44:44 (12 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: Yes (related to CAS-3749)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: added a new method, _alive(), in asaplotbase class

Test Programs: Interactive tests

Put in Release Notes: No

Module(s):

Description:

Added a new method, _alive(), in asaplotbase class. The method return True
if asaplot instance is alive. More complete check compared to 'is_dead' parameter.
asapplotter._assert_plotter method is simplified by calling this function.

Fixed misc bugs found in interactive tests.

  1. set back linewidth = 1 in plots invoked by modules, interactivemask, asapmath, and asapfitter.
  2. interactivemask module: plotter in properly quited at the end.
  3. interactivemask module: avoid error when user close interacive plot window before calling the finalization method, finish_selection().
  4. added definition of a dummy function, quit(), in asaplot class.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/interactivemask.py

    r2453 r2538  
    156156            self.showmask = True
    157157
    158         #if not self.p._plotter or self.p._plotter.is_dead:
    159158        if not self.p:
    160159            asaplog.push('A new ASAP plotter will be loaded')
     
    164163            self.newplot = True
    165164        self.p._assert_plotter(action='reload')
     165        from matplotlib import rc as rcp
     166        rcp('lines', linewidth=1)
    166167       
    167168        # Plot selected spectra if needed
     
    339340        if callback: self.callback=callback
    340341        if self.callback: self.callback()
    341         if not self.event: self.p._plotter.register('button_press',None)
     342        if not self.event:
     343            try: self.p._plotter.register('button_press',None)
     344            except: pass # plotter window is closed by X button.
    342345        # Finish the plot
    343346        if not self.newplot:
    344347            self.clear_polygon()
    345348        else:
    346             self.p._plotter.unmap()
     349            #self.p._plotter.unmap()
     350            self.p._plotter.quit()
    347351            self.p._plotter = None
    348352            del self.p
Note: See TracChangeset for help on using the changeset viewer.