Changeset 70c57ebf in sasview for sansview/perspectives
- Timestamp:
- Apr 29, 2009 3:41:27 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:
- 2cded48
- Parents:
- 24b8d5c
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
rfbf4bf8 r70c57ebf 62 62 if self.model !=None: 63 63 self.disp_list= self.model.getDispParamList() 64 64 65 ##enable model 2D draw 65 66 self.enable2D= False … … 451 452 452 453 self.state.enable2D = copy.deepcopy(self.enable2D) 453 454 if hasattr(self,"cb1"): 455 self.state.cb1= self.cb1.GetValue() 454 try: 455 n = self.disp_box.GetCurrentSelection() 456 dispersity= self.disp_box.GetClientData(n) 457 name= dispersity.__name__ 458 if name == "GaussianDispersion": 459 if hasattr(self,"cb1"): 460 self.state.cb1= self.cb1.GetValue() 456 461 462 except: 463 pass 464 457 465 if hasattr(self,"enable_disp"): 458 466 self.state.enable_disp= self.enable_disp.GetValue() … … 768 776 Display the sizer according to the type of the current model 769 777 """ 778 if model ==None: 779 return 770 780 if hasattr(model ,"model2"): 771 781 … … 1169 1179 """ 1170 1180 self._reset_dispersity() 1171 1181 if self.model ==None: 1182 self.model_disp.Hide() 1183 self.disp_box.Hide() 1184 self.sizer4_4.Clear(True) 1185 self._reset_dispersity() 1186 ## post state to fit panel 1187 self.save_current_state() 1188 return 1189 1172 1190 if self.enable_disp.GetValue(): 1173 1191 self.model_disp.Show(True) … … 1322 1340 self.sizer4.Layout() 1323 1341 self.SetScrollbars(20,20,200,100) 1324 1325 1342 1326 1343 def _set_range_sizer(self, title, object1=None,object=None): 1327 1344 """ -
sansview/perspectives/fitting/fitpage.py
rfbf4bf8 r70c57ebf 522 522 """ 523 523 self._on_select_model_helper() 524 if self.model == None: 525 self.set_model_param_sizer(self.model) 526 return 527 else: 528 self.set_model_param_sizer(self.model) 529 try: 530 temp_smear= None 531 if self.enable_smearer.GetValue(): 532 temp_smear= self.smearer 533 self.compute_chisqr(temp_smear) 534 except: 535 ## error occured on chisqr computation 536 pass 524 self.set_model_param_sizer(self.model) 525 537 526 self.enable_disp.SetValue(False) 538 527 self.disable_disp.SetValue(True) 539 528 self.set_dispers_sizer() 540 541 evt = ModelEventbox(model=self.model) 542 wx.PostEvent(self.event_owner, evt) 529 if self.model !=None: 530 try: 531 temp_smear= None 532 if self.enable_smearer.GetValue(): 533 temp_smear= self.smearer 534 self.compute_chisqr(temp_smear) 535 except: 536 ## error occured on chisqr computation 537 pass 538 evt = ModelEventbox(model=self.model) 539 wx.PostEvent(self.event_owner, evt) 543 540 544 541 -
sansview/perspectives/fitting/modelpage.py
r1f9ff448 r70c57ebf 330 330 """ 331 331 self.model = model 332 if self.model ==None: 333 self.set_model_param_sizer(self.model) 334 return 332 333 self.set_model_param_sizer(self.model) 335 334 self.set_model_param_sizer(self.model) 336 335 ## keep the sizer view consistent with the model menu selecting … … 340 339 self.set_dispers_sizer() 341 340 self.model_view.SetFocus() 342 self._draw_model() 341 if self.model !=None: 342 self._draw_model() 343 343 344 344
Note: See TracChangeset
for help on using the changeset viewer.