Changeset 10c43a5 in sasview
- Timestamp:
- Feb 6, 2009 12:30:42 AM (16 years ago)
- 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
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage1D.py
re191da5 r10c43a5 26 26 ## Title to appear on top of the window 27 27 window_caption = "Fit Page" 28 28 name=None 29 29 30 30 def __init__(self, parent,data, *args, **kwargs): -
sansview/perspectives/fitting/fitpanel.py
r888e62c r10c43a5 43 43 self.AddPage(self.sim_page,"Simultaneous Fit") 44 44 45 45 self._mgr = wx.aui.AuiManager(self) 46 46 47 47 … … 53 53 #model page info 54 54 self.model_page_number=None 55 self.page_name=None55 56 56 self.model_page=None 57 57 # increment number for model name … … 115 115 from fitpage1D import FitPage1D 116 116 panel = FitPage1D(self,data, -1) 117 panel.name=name 117 118 m_name= "M"+str(self.count) 118 119 panel.set_manager(self.manager) … … 139 140 self.AddPage(page=panel,caption="Model",select=True) 140 141 panel.populate_box( self.model_list_box) 142 panel.name=page_title 141 143 self.draw_model_name=page_title 142 144 self.model_page_number=self.GetSelection() … … 166 168 @param npts: number of Q points 167 169 """ 170 print "self.draw_model_name none",self.draw_model_name 168 171 if self.draw_model_name ==None: 172 print "self.draw_model_name none" 169 173 self._help_add_model_page(model,description,page_title, qmin=qmin, qmax=qmax, npts=npts) 170 174 elif topmenu==True: 171 175 self.model_page.select_model(model, page_title) 172 176 173 177 def get_current_page(self): 174 178 """ … … 179 183 180 184 181 def o ld_onClose(self, page=None,page_number=None):185 def onClose(self, page=None,page_number=None): 182 186 """ 183 187 close the current page except the simpage. remove each check box link to the model 184 188 selected on that page. remove its reference into page_finder (fitting module) 185 189 """ 186 #print "model page", page_number, page190 print "model page", page_number, page, self.draw_model_name 187 191 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() 191 195 self.model_page_number=None 192 196 self.model_page=None 193 197 self.draw_model_name=None 198 print"self.draw_model_name",self.draw_model_name 194 199 return 195 200 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 199 204 if sim_page != selected_page: 205 print "sim_page ",sim_page ,selected_page 200 206 # remove the check box link to the model name of this page (selected_page) 201 207 sim_page.remove_model(selected_page) … … 207 213 break 208 214 #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" 211 219 self.draw_model_name=None 220 self.model_page=None 212 221 if page_number == 1: 213 222 self.model_page=None 214 223 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) 217 227 #self.count =self.count -1 218 228 self.fit_page_name=None -
sansview/perspectives/fitting/modelpage.py
r888e62c r10c43a5 26 26 ## Title to appear on top of the window 27 27 window_caption = "Fit Page" 28 29 28 name="" 30 29 def __init__(self, parent,model,name, *args, **kwargs): 31 30 wx.ScrolledWindow.__init__(self, parent, *args, **kwargs)
Note: See TracChangeset
for help on using the changeset viewer.