Changeset 1979
- Timestamp:
- 01/27/11 12:23:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/casatoolbar.py
r1945 r1979 174 174 self.plotter._plotter.tidy() 175 175 self.plotter._plotter.show(hardrefresh=False) 176 pass 176 177 177 178 178 ##################################### … … 202 202 def _add_custom_toolbar(self): 203 203 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) 207 207 self.bStat=self._NewButton(master=self, 208 208 text='statistics', … … 242 242 self.figmgr.toolbar.set_message('spec value: drag on a spec') 243 243 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') 247 247 self.mode='spec' 248 248 self.notewin.close_widgets() 249 249 self.__disconnect_event() 250 #self.canvas.mpl_connect('button_press_event',self._select_spectrum)251 250 self._p.register('button_press',self._select_spectrum) 252 251 … … 254 253 if not self.figmgr.toolbar.mode == '' or not self.button: return 255 254 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') 258 261 self.bStat.config(relief='sunken') 259 262 self.bNote.config(relief='raised') … … 266 269 if not self.figmgr.toolbar.mode == '': return 267 270 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') 270 277 self.bStat.config(relief='raised') 271 278 self.bNote.config(relief='sunken') … … 290 297 def enable_button(self): 291 298 if self.button: return 292 self.bSpec.config(state=Tk.NORMAL)299 #self.bSpec.config(state=Tk.NORMAL) 293 300 self.bStat.config(state=Tk.NORMAL) 294 301 self.button=True … … 298 305 if not self.button: return 299 306 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) 301 308 #self.bPrev.config(state=Tk.DISABLED) 302 309 #self.bNext.config(state=Tk.DISABLED)
Note:
See TracChangeset
for help on using the changeset viewer.