Changeset 25c0def in sasview
- Timestamp:
- Apr 12, 2012 4:20:56 PM (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:
- a3efdeb
- Parents:
- 1e6d7290
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
rcce182ae r25c0def 3040 3040 if wx.TheClipboard.Open(): 3041 3041 wx.TheClipboard.SetData(wx.TextDataObject(str(content))) 3042 data = wx.TextDataObject()3043 success = wx.TheClipboard.GetData(data)3044 text = data.GetText()3045 3042 wx.TheClipboard.Close() 3046 3043 return True … … 3069 3066 3070 3067 # 2D 3071 if self.data.__class__.__name__ == "Data2D":3068 if self.data.__class__.__name__ == "Data2D": 3072 3069 try: 3073 3070 check = item[0].GetValue() … … 3114 3111 # Get text from the clip board 3115 3112 if wx.TheClipboard.Open(): 3116 if wx.TheClipboard.IsSupported(wx.DataFormat(wx.DF_TEXT)): 3117 data = wx.TextDataObject() 3118 # get wx dataobject 3119 success = wx.TheClipboard.GetData(data) 3120 # get text 3121 text = data.GetText() 3122 # close clipboard 3123 wx.TheClipboard.Close() 3124 3113 if wx.TheClipboard.IsSupported(wx.DataFormat(wx.DF_TEXT)): 3114 data = wx.TextDataObject() 3115 # get wx dataobject 3116 success = wx.TheClipboard.GetData(data) 3117 # get text 3118 text = data.GetText() 3119 # close clipboard 3120 wx.TheClipboard.Close() 3125 3121 return text 3126 3122 … … 3146 3142 for line in lines[1:-1]: 3147 3143 if len(line) != 0: 3148 item = line.split(',')3144 item = line.split(',') 3149 3145 check = item[1] 3150 3146 name = item[0] … … 3204 3200 for item in param: 3205 3201 # 2D 3206 if self.data.__class__.__name__ == "Data2D":3202 if self.data.__class__.__name__ == "Data2D": 3207 3203 name = item[1] 3208 3204 if name in content.keys(): … … 3223 3219 if self.model.fun_list.has_key(content[name][1]): 3224 3220 fun_val = self.model.fun_list[content[name][1]] 3225 self.model.setParam(name, fun_val)3221 self.model.setParam(name, fun_val) 3226 3222 3227 3223 value = content[name][1:] … … 3259 3255 if self.model.fun_list.has_key(value[0]): 3260 3256 fun_val = self.model.fun_list[value[0]] 3261 self.model.setParam(name, fun_val)3257 self.model.setParam(name, fun_val) 3262 3258 # save state 3263 3259 #self._copy_parameters_state(self.str_parameters, … … 3288 3284 name = item[7].Name 3289 3285 param_name = name.split('.')[0] 3290 disp_name = item[7].GetValue() 3291 dispersity= item[7].GetClientData(selection) 3286 dispersity = item[7].GetClientData(selection) 3292 3287 disp_model = dispersity() 3293 3288 # Only for array disp … … 3315 3310 self.state.weights = self.weights 3316 3311 self.model._persistency_dict[param_name] = \ 3317 [state.values, state.weights] 3312 [self.state.values, 3313 self.state.weights] 3318 3314 3319 3315 except: 3320 p ass3316 print "Error in BasePage._paste_poly_help: %s" % sys.exc_value 3321 3317 3322 3318 def _set_disp_array_cb(self, item): … … 3333 3329 item[6].SetValue('') 3334 3330 item[6].Enable(False) 3335 3336 3331 3332 def update_pinhole_smear(self): 3333 """ 3334 Method to be called by sub-classes 3335 TODO: this method doesn't belong here 3336 """ 3337 print "BasicPage.update_pinhole_smear was called: skipping" 3338 return 3339 3340
Note: See TracChangeset
for help on using the changeset viewer.