Changeset 10c43a5 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Feb 6, 2009 12:30:42 AM (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:
216efab
Parents:
4af20b4
Message:

fixing close button errors

Location:
sansview/perspectives/fitting
Files:
2 deleted
3 edited

Legend:

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

    re191da5 r10c43a5  
    2626    ## Title to appear on top of the window 
    2727    window_caption = "Fit Page" 
    28      
     28    name=None 
    2929     
    3030    def __init__(self, parent,data, *args, **kwargs): 
  • sansview/perspectives/fitting/fitpanel.py

    r888e62c r10c43a5  
    4343        self.AddPage(self.sim_page,"Simultaneous Fit") 
    4444         
    45          
     45        self._mgr = wx.aui.AuiManager(self) 
    4646 
    4747         
     
    5353        #model page info 
    5454        self.model_page_number=None 
    55         self.page_name=None 
     55        
    5656        self.model_page=None 
    5757        # increment number for model name 
     
    115115            from fitpage1D import FitPage1D 
    116116            panel = FitPage1D(self,data, -1) 
     117            panel.name=name 
    117118            m_name= "M"+str(self.count)   
    118119            panel.set_manager(self.manager) 
     
    139140        self.AddPage(page=panel,caption="Model",select=True) 
    140141        panel.populate_box( self.model_list_box) 
     142        panel.name=page_title 
    141143        self.draw_model_name=page_title 
    142144        self.model_page_number=self.GetSelection() 
     
    166168            @param npts: number of Q points 
    167169        """ 
     170        print "self.draw_model_name none",self.draw_model_name 
    168171        if  self.draw_model_name ==None: 
     172            print "self.draw_model_name none" 
    169173            self._help_add_model_page(model,description,page_title, qmin=qmin, qmax=qmax, npts=npts) 
    170174        elif topmenu==True: 
    171175            self.model_page.select_model(model, page_title) 
    172             
     176           
    173177    def get_current_page(self): 
    174178        """ 
     
    179183   
    180184     
    181     def old_onClose(self, page=None,page_number=None): 
     185    def onClose(self, page=None,page_number=None): 
    182186        """ 
    183187             close the current page except the simpage. remove each check box link to the model 
    184188             selected on that page. remove its reference into page_finder (fitting module) 
    185189        """ 
    186         #print "model page", page_number, page 
     190        print "model page", page_number, page, self.draw_model_name 
    187191        if page!=None and page_number!=None: 
    188              
    189             self.nb.RemovePage(page_number) 
    190             page.Destroy() 
     192            i=self.DeletePage(page_number) 
     193            #self.nb.RemovePage(page_number) 
     194            #page.Destroy() 
    191195            self.model_page_number=None 
    192196            self.model_page=None 
    193197            self.draw_model_name=None 
     198            print"self.draw_model_name",self.draw_model_name 
    194199            return  
    195200        try: 
    196             sim_page = self.nb.GetPage(0) 
    197             selected_page = self.nb.GetPage(self.nb.GetSelection()) 
    198              
     201            sim_page = self.GetPage(1) 
     202            selected_page = self.GetPage(self.GetSelection()) 
     203            print "sim_page ",sim_page ,selected_page 
    199204            if sim_page != selected_page: 
     205                print "sim_page ",sim_page ,selected_page 
    200206                # remove the check box link to the model name of this page (selected_page) 
    201207                sim_page.remove_model(selected_page) 
     
    207213                        break 
    208214                #Delete the page from notebook 
    209                 page_number = self.nb.GetSelection() 
    210                 if self.nb.GetPageText(page_number)== self.page_name: 
     215                page_number = self.GetSelection() 
     216                print selected_page.name,self.GetPageText(page_number),self.draw_model_name 
     217                if selected_page.name== self.draw_model_name: 
     218                    print "went here" 
    211219                    self.draw_model_name=None 
     220                    self.model_page=None 
    212221                if  page_number == 1: 
    213222                    self.model_page=None 
    214223                    self.draw_model_name=None 
    215                 selected_page.Destroy() 
    216                 self.nb.RemovePage(page_number) 
     224                #selected_page.Destroy() 
     225                #self.RemovePage(page_number) 
     226                i=self.DeletePage(page_number) 
    217227                #self.count =self.count -1  
    218228                self.fit_page_name=None 
  • sansview/perspectives/fitting/modelpage.py

    r888e62c r10c43a5  
    2626    ## Title to appear on top of the window 
    2727    window_caption = "Fit Page" 
    28      
    29      
     28    name="" 
    3029    def __init__(self, parent,model,name, *args, **kwargs): 
    3130        wx.ScrolledWindow.__init__(self, parent, *args, **kwargs) 
Note: See TracChangeset for help on using the changeset viewer.