Changeset c477b31 in sasview for sansview/perspectives
- Timestamp:
- Apr 21, 2009 5:11:00 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:
- 29953e2
- Parents:
- eba0cb5f
- Location:
- sansview/perspectives/fitting
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
rd2d0cfdf rc477b31 343 343 self.state.model = self.model.clone() 344 344 new_state = self.state.clone() 345 ## save checkbutton state and txtcrtl values 346 self._copy_parameters_state(self.orientation_params, 347 self.state.orientation_params) 348 self._copy_parameters_state(self.orientation_params_disp, 349 self.state.orientation_params_disp) 350 self._copy_parameters_state(self.parameters, self.state.parameters) 351 352 self._copy_parameters_state(self.fittable_param, self.state.fittable_param) 353 self._copy_parameters_state(self.fixed_param, self.state.fixed_param) 354 345 new_state.enable2D = copy.deepcopy(self.enable2D) 355 346 ##Add model state on context menu 356 347 self.number_saved_state += 1 … … 451 442 self.state.model = self.model.clone() 452 443 self.state.save_data(self.data) 453 444 445 self.state.enable2D = copy.deepcopy(self.enable2D) 446 454 447 if hasattr(self,"cb1"): 455 448 self.state.cb1= self.cb1.GetValue() … … 467 460 if hasattr(self,"disp_box"): 468 461 self.state.disp_box = self.disp_box.GetCurrentSelection() 462 if len(self.disp_cb_dict)>0: 463 for k , v in self.disp_cb_dict.iteritems(): 464 if v ==None : 465 self.state.disp_cb_dict[k]= v 466 else: 467 try: 468 self.state.disp_cb_dict[k]=v.GetValue() 469 except: 470 self.state.disp_cb_dict[k]= None 471 472 if len(self._disp_obj_dict)>0: 473 for k , v in self._disp_obj_dict.iteritems(): 474 self.state._disp_obj_dict[k]= v 475 469 476 self._save_plotting_range() 470 477 … … 503 510 self._set_model_sizer_selection( self.model ) 504 511 self.set_model_param_sizer(self.model) 512 513 self.enable2D= state.enable2D 514 self.state.enable2D= state.enable2D 515 516 if hasattr(self,"model_view"): 517 if not self.enable2D: 518 self.model_view.Enable() 519 else: 520 self.model_view.Disable() 521 505 522 if hasattr(self, "cb1"): 506 523 self.cb1.SetValue(self.state.cb1) … … 510 527 if hasattr(self, "disp_box"): 511 528 self.disp_box.SetSelection(self.state.disp_box) 529 530 self.disp_cb_dict = {} 531 for k,v in self.state.disp_cb_dict.iteritems(): 532 self.disp_cb_dict = copy.deepcopy(state.disp_cb_dict) 533 self.state.disp_cb_dict = copy.deepcopy(state.disp_cb_dict) 534 535 self._disp_obj_dict={} 536 for k , v in self.state._disp_obj_dict.iteritems(): 537 self._disp_obj_dict[k]=v 538 512 539 self._set_dipers_Param(event=None) 513 540 ##plotting range restore … … 529 556 self._reset_parameters_state(self.fittable_param,state.fittable_param) 530 557 self._reset_parameters_state(self.fixed_param,state.fixed_param) 531 558 self._onparamEnter_helper() 532 559 ## reset context menu items 533 560 self._reset_context_menu() 534 561 ## draw the model with previous parameters value 535 self._draw_model()562 #self._draw_model() 536 563 537 564 … … 634 661 if is_modified: 635 662 self._draw_model() 663 self.save_current_state() 636 664 637 665 -
sansview/perspectives/fitting/fitpage.py
rd2d0cfdf rc477b31 250 250 self._disp_obj_dict[item] = disp_model 251 251 self.model.set_dispersion(item, disp_model) 252 self.state._disp_obj_dict[item]= disp_model 252 253 253 254 ix=0 … … 436 437 ,None,None, None, None,None]) 437 438 438 439 self.state.disp_cb_dict = copy.deepcopy(self.disp_cb_dict) 439 440 wx.PostEvent(self.parent, StatusEvent(status=\ 440 441 " Selected Distribution: Gaussian")) -
sansview/perspectives/fitting/modelpage.py
ra7fe3e3 rc477b31 137 137 self._disp_obj_dict[item] = disp_model 138 138 self.model.set_dispersion(item, disp_model) 139 self.state._disp_obj_dict[item]= disp_model 140 141 139 142 ix=0 140 143 iy=1 … … 309 312 if item[2]!=None: 310 313 item[2].Enable() 311 314 self.state.enable2D = copy.deepcopy(self.enable2D) 312 315 313 316 … … 546 549 else: 547 550 self.text2_4.Hide() 548 551 self.state.disp_cb_dict = copy.deepcopy(self.disp_cb_dict) 549 552 boxsizer1.Add(sizer) 550 553 self.sizer3.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10) -
sansview/perspectives/fitting/pagestate.py
rfc6ea43 rc477b31 48 48 #list of dispersion paramaters 49 49 self.disp_list =[] 50 self._disp_obj_dict={} 51 self.disp_cb_dict={} 50 52 #contains link between a model and selected parameters to fit 51 53 self.param_toFit =[] … … 70 72 self.enable_disp= False 71 73 self.disable_disp= True 74 ## plot 2D data 75 self.enable2D= False 72 76 ## state of selected all check button 73 77 self.cb1 = False … … 92 96 obj.event_owner = self.event_owner 93 97 98 obj.enable2D = copy.deepcopy(self.enable2D) 94 99 obj.parameters = copy.deepcopy(self.parameters) 95 100 obj.fixed_param = copy.deepcopy(self.fixed_param) … … 101 106 obj.disable_disp = copy.deepcopy(self.disable_disp) 102 107 108 if len(self._disp_obj_dict)>0: 109 for k , v in self._disp_obj_dict.iteritems(): 110 obj._disp_obj_dict[k]= v 111 obj.disp_cb_dict = copy.deepcopy(self.disp_cb_dict) 103 112 obj.enable_smearer = copy.deepcopy(self.enable_smearer) 104 113 obj.disable_smearer = copy.deepcopy(self.disable_smearer)
Note: See TracChangeset
for help on using the changeset viewer.