Changeset c3435b7f in sasview for sansview


Ignore:
Timestamp:
May 13, 2009 12:06:34 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
dad49a0
Parents:
df4c3ad
Message:

slicer clear when panel close

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitting.py

    rdf4c3ad rc3435b7f  
    7676        #List of selected data 
    7777        self.selected_data_list=[] 
    78         ## list of panel with slicer 
    79         self.main_panel=[] 
     78        ## list of slicer panel created to display slicer parameters and results 
     79        self.slicer_panels=[] 
    8080        # Log startup 
    8181        logging.info("Fitting plug-in started")    
     
    835835            @param event: event containing a panel 
    836836        """ 
     837        
    837838        if event.panel!=None: 
    838839            new_panel = event.panel 
    839             #self.main_panel.append(event.main_panel) 
     840            self.slicer_panels.append(event.panel) 
    840841            # Set group ID if available 
    841842            event_id = self.parent.popup_panel(new_panel) 
     
    853854        """ 
    854855        name =event.GetPane().caption 
    855         key="boxsum" 
    856         try: 
    857             if name.lower().count(key)>0: 
    858                 toks=[] 
    859                 toks= name.lower().split(key)     
    860                 temp= toks[1].split() 
    861                 panel_name= temp[0].lstrip().rstrip() 
     856     
     857        for panel in self.slicer_panels: 
     858            if panel.window_caption==name: 
     859                 
    862860                for item in self.parent.panels: 
    863                     if self.parent.panels[item].window_caption.lower().startswith(panel_name):  
    864                         if hasattr(self.parent.panels[item],"slicer"): 
     861                    if hasattr(self.parent.panels[item],"uid"): 
     862                        if self.parent.panels[item].uid ==panel.base.uid: 
    865863                            self.parent.panels[item].onClearSlicer(event) 
    866864                            self.parent._mgr.Update() 
    867865                            break  
    868                 
    869             else: 
    870                 return  
    871         except: 
    872             raise  
    873             return  
     866                break 
    874867        
    875868        
Note: See TracChangeset for help on using the changeset viewer.