Changeset 168a845 in sasview for guiframe


Ignore:
Timestamp:
Apr 26, 2011 12:41:50 PM (14 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:
23ccf07
Parents:
34b9813
Message:

Improved open project (Graph menu)

Location:
guiframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r4bee68d r168a845  
    213213                    self.panels[ID].on_kill_focus(None) 
    214214 
    215             if self._data_panel is not None: 
     215            if self._data_panel is not None and \ 
     216                            self.panel_on_focus is not None: 
    216217                panel_name = self.panel_on_focus.window_caption 
    217218                ID = self.panel_on_focus.uid 
     
    12131214                    plug.clear_panel()  
    12141215                if self.defaultPanel != None: 
    1215                     default_panel = self.panels['default'] 
    1216                     self.panels = {'default': default_panel} 
     1216                    self.panels = {'default': self.defaultPanel} 
    12171217                else: 
    12181218                    #self.clear_panel() 
    12191219                    self.panels = {} 
    1220                      
     1220                self._data_panel.clear_panel()     
    12211221                self.plot_panels = {} 
    12221222            self.panel_on_focus = None     
  • guiframe/local_perspectives/plotting/plotting.py

    r4bee68d r168a845  
    9494    def clear_panel(self): 
    9595        """ 
    96         Clear and Hide all plot panels 
     96        Clear and Hide all plot panels, and remove them from menu 
    9797        """ 
    9898        for group_id in self.plot_panels.keys(): 
     
    100100            panel.graph.reset() 
    101101            self.hide_panel(group_id) 
    102         self.plot_panels = {}      
     102        self.plot_panels = {} 
     103        item = self.menu.FindItemByPosition(0) 
     104        while item != None: 
     105            self.menu.DeleteItem(item)  
     106            try: 
     107                item = self.menu.FindItemByPosition(0) 
     108            except: 
     109                item = None 
     110                
    103111     
    104112    def clear_panel_by_id(self, group_id): 
Note: See TracChangeset for help on using the changeset viewer.