Changeset c0c9f68e in sasview


Ignore:
Timestamp:
Aug 23, 2011 10:25:02 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
846c724
Parents:
09ef5a60
Message:

better focus on plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    rf15f144d rc0c9f68e  
    385385            if self._data_panel is not None and \ 
    386386                            self.panel_on_focus is not None: 
    387                 panel_name = self.panel_on_focus.window_caption 
    388                 ID = self.panel_on_focus.uid 
    389                 self._data_panel.set_panel_on_focus(ID) 
    390                 #update combo 
    391                 if self.panel_on_focus in self.plot_panels.values(): 
    392                     combo = self._data_panel.cb_plotpanel 
    393                     combo_title = str(self.panel_on_focus.window_caption) 
    394                     combo.SetStringSelection(combo_title) 
    395                     combo.SetToolTip( wx.ToolTip(combo_title ))  
    396                 elif self.panel_on_focus != self._data_panel: 
    397                     cpanel = self.panel_on_focus 
    398                     if self.cpanel_on_focus != cpanel: 
    399                         self.cpanel_on_focus = self.panel_on_focus 
     387                self.set_panel_on_focus_helper() 
    400388                #update toolbar 
    401389                self._update_toolbar_helper() 
    402390                #update edit menu 
    403391                self.enable_edit_menu() 
    404  
     392     
     393    def set_panel_on_focus_helper(self): 
     394        """ 
     395        Helper for panel on focus with data_panel 
     396        """ 
     397        panel_name = self.panel_on_focus.window_caption 
     398        ID = self.panel_on_focus.uid 
     399        self._data_panel.set_panel_on_focus(ID) 
     400        #update combo 
     401        if self.panel_on_focus in self.plot_panels.values(): 
     402            combo = self._data_panel.cb_plotpanel 
     403            combo_title = str(self.panel_on_focus.window_caption) 
     404            combo.SetStringSelection(combo_title) 
     405            combo.SetToolTip( wx.ToolTip(combo_title ))  
     406        elif self.panel_on_focus != self._data_panel: 
     407            cpanel = self.panel_on_focus 
     408            if self.cpanel_on_focus != cpanel: 
     409                self.cpanel_on_focus = self.panel_on_focus 
     410                 
    405411    def reset_bookmark_menu(self, panel): 
    406412        """ 
     
    846852            if len(self.plot_panels) == 1: 
    847853                self.panel_on_focus = p 
    848                 self.set_panel_on_focus(None) 
     854                self.set_panel_on_focus_helper() 
    849855            if self._data_panel is not None and \ 
    850856                self._plotting_plugin is not None: 
     
    25342540        # set focusing panel 
    25352541        self.panel_on_focus = panel   
    2536         self.set_panel_on_focus(None) 
     2542        self.set_panel_on_focus_helper() 
    25372543     
    25382544    def set_plot_unfocus(self):  
Note: See TracChangeset for help on using the changeset viewer.