Changeset 882a912 in sasview
- Timestamp:
- Apr 17, 2009 2:39:42 PM (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:
- 6ed82c7
- Parents:
- 5ee2306
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
r3fef0a8 r882a912 530 530 return 531 531 532 533 def set_data(self, data ): 534 """ 535 reset the current data 536 """ 537 if data ==None: 538 return 539 self.data =data 540 self.state.data= data 541 self._fill_datainfo_sizer() 542 self.SetScrollbars(20,20,200,100) 543 self.Layout() 544 532 545 def reset_page(self, state): 533 546 """ -
sansview/perspectives/fitting/fitpanel.py
rff36f31 r882a912 79 79 #model page info 80 80 self.model_page_number=None 81 81 ## fit page number for model plot 82 self.fit_page1D_number=None 83 self.fit_page2D_number=None 82 84 self.model_page=None 83 85 self.sim_page=None … … 121 123 122 124 fitproblem= page_finder[selected_page].clone() 125 if self.GetPageIndex(selected_page)==self.fit_page1D_number: 126 self.fit_page1D_number=None 127 if self.GetPageIndex(selected_page)==self.fit_page2D_number: 128 self.fit_page2D_number=None 123 129 ## page on menu 124 130 self.manager._add_page_onmenu(page_name, fitproblem) … … 185 191 @return panel : page just added for further used. is used by fitting module 186 192 """ 187 try:193 if data.is_data: 188 194 name = data.name 189 except: 190 name = 'Fit' 195 else: 196 if data.__class__.__name__=="Data2D": 197 name = 'Model 2D Fit' 198 else: 199 name = 'Model 1D Fit' 191 200 if not name in self.list_fitpage_name: 192 201 myinfo = PageInfo( data=data, name=name ) … … 202 211 203 212 self.AddPage(page=panel, caption=name, select=True) 213 if name == 'Model 1D Fit': 214 self.fit_page1D_number= self.GetPageIndex(panel) 215 if name =='Model 2D Fit': 216 self.fit_page2D_number= self.GetPageIndex(panel) 217 204 218 self.list_fitpage_name.append(name) 205 219 if reset: … … 210 224 self.fit_page_name[name]=[] 211 225 self.fit_page_name[name].insert(0,panel.createMemento()) 212 226 #GetPage(self, page_idx) 213 227 return panel 214 else: 215 return None 228 elif name =='Model 1D Fit': 229 if self.fit_page1D_number!=None: 230 panel =self.GetPage(self.fit_page1D_number) 231 self.fit_page_name[name]=[] 232 self.fit_page_name[name].insert(0,panel.createMemento()) 233 return panel 234 return None 235 elif name =='Model 2D Fit': 236 if self.fit_page2D_number!=None: 237 panel =self.GetPage(self.fit_page2D_number) 238 self.fit_page_name[name]=[] 239 self.fit_page_name[name].insert(0,panel.createMemento()) 240 return panel 241 return None 242 return None 216 243 217 244
Note: See TracChangeset
for help on using the changeset viewer.