Changeset 1979


Ignore:
Timestamp:
01/27/11 12:23:14 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: the "spec value" button is removed from the toolbar.

Test Programs: plot spectra with asap plotter

Put in Release Notes: Yes

Module(s): asapplotter

Description: The "spec value" mode is set to the default status of asap plotter and the button for it is removed.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/casatoolbar.py

    r1945 r1979  
    174174        self.plotter._plotter.tidy()
    175175        self.plotter._plotter.show(hardrefresh=False)
    176         pass
     176
    177177
    178178#####################################
     
    202202    def _add_custom_toolbar(self):
    203203        Tk.Frame.__init__(self,master=self.figmgr.window)
    204         self.bSpec=self._NewButton(master=self,
    205                                    text='spec value',
    206                                    command=self.spec_show)
     204        #self.bSpec=self._NewButton(master=self,
     205        #                           text='spec value',
     206        #                           command=self.spec_show)
    207207        self.bStat=self._NewButton(master=self,
    208208                                   text='statistics',
     
    242242        self.figmgr.toolbar.set_message('spec value: drag on a spec')
    243243        if self.mode == 'spec': return
    244         self.bStat.config(relief='raised')
    245         self.bSpec.config(relief='sunken')
    246         self.bNote.config(relief='raised')
     244        #self.bStat.config(relief='raised')
     245        #self.bSpec.config(relief='sunken')
     246        #self.bNote.config(relief='raised')
    247247        self.mode='spec'
    248248        self.notewin.close_widgets()
    249249        self.__disconnect_event()
    250         #self.canvas.mpl_connect('button_press_event',self._select_spectrum)
    251250        self._p.register('button_press',self._select_spectrum)
    252251
     
    254253        if not self.figmgr.toolbar.mode == '' or not self.button: return
    255254        self.figmgr.toolbar.set_message('statistics: select a region')
    256         if self.mode == 'stat': return
    257         self.bSpec.config(relief='raised')
     255        if self.mode == 'stat':
     256            # go back to spec mode
     257            self.bStat.config(relief='raised')
     258            self.spec_show()
     259            return
     260        #self.bSpec.config(relief='raised')
    258261        self.bStat.config(relief='sunken')
    259262        self.bNote.config(relief='raised')
     
    266269        if not self.figmgr.toolbar.mode == '': return
    267270        self.figmgr.toolbar.set_message('text: select a position/text')
    268         if self.mode == 'note': return
    269         self.bSpec.config(relief='raised')
     271        if self.mode == 'note':
     272            self.bNote.config(relief='raised')
     273            self.mode='none'
     274            self.spec_show()
     275            return
     276        #self.bSpec.config(relief='raised')
    270277        self.bStat.config(relief='raised')
    271278        self.bNote.config(relief='sunken')
     
    290297    def enable_button(self):
    291298        if self.button: return
    292         self.bSpec.config(state=Tk.NORMAL)
     299        #self.bSpec.config(state=Tk.NORMAL)
    293300        self.bStat.config(state=Tk.NORMAL)
    294301        self.button=True
     
    298305        if not self.button: return
    299306        self.bStat.config(relief='raised', state=Tk.DISABLED)
    300         self.bSpec.config(relief='raised', state=Tk.DISABLED)
     307        #self.bSpec.config(relief='raised', state=Tk.DISABLED)
    301308        #self.bPrev.config(state=Tk.DISABLED)
    302309        #self.bNext.config(state=Tk.DISABLED)
Note: See TracChangeset for help on using the changeset viewer.