Changeset 01642fec in sasview for fittingview/src/sans/perspectives/fitting/basepage.py
- Timestamp:
- Oct 7, 2011 10:35:02 AM (13 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:
- b6685b2
- Parents:
- ace0e33
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
race0e33 r01642fec 615 615 msg +=" reloaded" 616 616 wx.PostEvent(self.parent.parent, StatusEvent(status=msg)) 617 617 self.Show(False) 618 618 name = menu.GetLabel(event.GetId()) 619 619 self._on_select_model_helper() … … 621 621 previous_state = self.saved_states[name] 622 622 ## reset state of checkbox,textcrtl and regular parameters value 623 self.Show(False)623 624 624 self.reset_page(previous_state) 625 625 self.Show(True) 626 626 627 627 def on_preview(self, event): … … 1799 1799 weight = get_weight(data=self.data, is2d=self._is_2D(), flag=flag) 1800 1800 toggle_mode_on = self.model_view.IsEnabled() 1801 is_2d = self._is_2D() 1801 1802 self._manager.draw_model(self.model, 1802 1803 data=self.data, … … 1807 1808 toggle_mode_on=toggle_mode_on, 1808 1809 state = self.state, 1809 enable2D= self.enable2D,1810 enable2D=is_2d, 1810 1811 update_chisqr=update_chisqr, 1811 1812 weight=weight) … … 3024 3025 float(pd) 3025 3026 except: 3026 continue3027 #if not pd and pd != '':3028 #continue3027 #continue 3028 if not pd and pd != '': 3029 continue 3029 3030 item[2].SetValue(str(pd)) 3030 3031 if item in self.fixed_param and pd == '': 3032 # Only array func has pd == '' case. 3033 item[2].Enable(False) 3031 3034 if item[2].__class__.__name__ == "ComboBox": 3032 3035 if self.model.fun_list.has_key(content[name][0]): … … 3049 3052 pd = float(pd) 3050 3053 except: 3051 continue3052 #if not pd and pd != '':3053 #continue3054 #continue 3055 if not pd and pd != '': 3056 continue 3054 3057 item[2].SetValue(str(pd)) 3055 3058 if item in self.fixed_param and pd == '': … … 3077 3080 item[7].SetValue(value[1]) 3078 3081 selection = item[7].GetCurrentSelection() 3079 param_name = item[7].Name.split('.')[0] 3082 name = item[7].Name 3083 param_name = name.split('.')[0] 3080 3084 disp_name = item[7].GetValue() 3081 3085 dispersity= item[7].GetClientData(selection) … … 3089 3093 disp_model.set_weights(pd_vals, 3090 3094 pd_weights) 3091 self.values[ param_name] = pd_vals3092 self.weights[ param_name] = pd_weights3095 self.values[name] = pd_vals 3096 self.weights[name] = pd_weights 3093 3097 # disable the fixed items for array 3094 3098 item[0].SetValue(False) 3095 3099 item[0].Enable(False) 3096 3100 item[2].Enable(False) 3101 item[3].Show(False) 3097 3102 item[4].Show(False) 3098 3103 item[5].SetValue('') … … 3102 3107 except: 3103 3108 pass 3104 self._disp_obj_dict[ param_name] = disp_model3105 self.model.set_dispersion( param_name,3109 self._disp_obj_dict[name] = disp_model 3110 self.model.set_dispersion(name, 3106 3111 disp_model) 3107 self.state._disp_obj_dict[ param_name] = \3112 self.state._disp_obj_dict[name] = \ 3108 3113 disp_model 3114 self.model.set_dispersion(name, disp_model) 3115 state.values = self.values 3116 state.weights = self.weights 3117 self.model._persistency_dict[name] = \ 3118 [state.values, state.weights] 3119 3109 3120 3110 3121 except:
Note: See TracChangeset
for help on using the changeset viewer.