Changeset 2171 for trunk/python


Ignore:
Timestamp:
05/17/11 19:21:35 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (a bug fix)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: interactive test

Put in Release Notes: No

Module(s): flagplotter

Description:

fixed a bug in CustomFlagToolbarCommon class, which caused unexpected flag region in
interactive flagging if end of mask region is outside of subplot.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/customgui_base.py

    r2170 r2171  
    696696                            'worldx': [event.xdata,event.xdata]}
    697697        self.plotter._plotter.register('button_press',None)
     698        self.xold = event.x
     699        self.xdataold = event.xdata
    698700        self.plotter._plotter.register('motion_notify', self._xspan_draw)
    699701        self.plotter._plotter.register('button_press', self._xspan_end)
     
    702704        if event.inaxes == self._thisregion['axes']:
    703705            xnow = event.x
    704             self.xdataold = xnow
     706            self.xold = xnow
     707            self.xdataold = event.xdata
    705708        else:
    706             xnow = self.xdataold
     709            xnow = self.xold
    707710        try: self.lastspan
    708711        except AttributeError: pass
     
    747750            self._selregions[srow] = []
    748751        self._selregions[srow].append(lregion)
    749         del lregion, pregion, xdataend
     752        del lregion, pregion, xdataend, self.xold, self.xdataold
    750753        sout = "selected region: "+str(self._thisregion['worldx'])+\
    751754              "(@row "+str(self._getrownum(self._thisregion['axes']))+")"
Note: See TracChangeset for help on using the changeset viewer.