Changeset 11857f7 in sasview


Ignore:
Timestamp:
Apr 19, 2012 5:43:19 PM (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:
5cc6d20
Parents:
9130227
Message:

fixed a bug in last feature added

File:
1 edited

Legend:

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

    r6e4d543 r11857f7  
    612612                self.enable_edit_menu() 
    613613     
    614     def disable_app_menu(self,p_panel=None):   
     614    def disable_app_menu(self, p_panel=None):   
    615615        """ 
    616616        Disables all menus in the menubar 
     
    629629 
    630630        if not enable: 
    631             p_panel.on_set_focus(None) 
    632631            if self._toolbar is not None: 
    633632                self._toolbar.update_toolbar(None) 
     633            p_panel.on_set_focus(None) 
    634634        else: 
    635635            self._toolbar.update_toolbar(c_panel) 
     
    11581158    def _update_toolbar_helper(self): 
    11591159        """ 
     1160        Helping to update the toolbar 
    11601161        """ 
    11611162        application_name = 'No Selected Analysis' 
    11621163        panel_name = 'No Panel on Focus' 
     1164        c_panel = self.cpanel_on_focus 
    11631165        if self._toolbar is  None: 
    11641166            return 
    1165         if self.cpanel_on_focus is not None: 
     1167        if c_panel is not None: 
    11661168            self.reset_bookmark_menu(self.cpanel_on_focus) 
    1167         self._toolbar.update_toolbar(self.cpanel_on_focus) 
    11681169        if self._current_perspective is not None: 
    11691170            application_name = self._current_perspective.sub_menu 
    1170         if self.cpanel_on_focus is not None: 
    1171             panel_name = self.cpanel_on_focus.window_caption 
    1172              
     1171        c_panel_state = c_panel 
     1172        if c_panel is not None: 
     1173            panel_name = c_panel.window_caption 
     1174            if not c_panel.IsShownOnScreen(): 
     1175                c_panel_state = None 
     1176        self._toolbar.update_toolbar(c_panel_state) 
    11731177        self._toolbar.update_button(application_name=application_name,  
    11741178                                        panel_name=panel_name) 
    1175          
    11761179        self._toolbar.Realize() 
    11771180         
Note: See TracChangeset for help on using the changeset viewer.