Changeset fc1761b in sasview for fittingview
- Timestamp:
- Oct 18, 2011 6:21:47 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:
- 46c4ccb
- Parents:
- f438e529
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/basepage.py
r58fc26c rfc1761b 2538 2538 # Make sure the check box updated when all checked 2539 2539 if self.cb1.GetValue(): 2540 self.select_all_param(None) 2540 #self.select_all_param(None) 2541 self.get_all_checked_params() 2541 2542 2542 2543 # update params … … 2913 2914 # 2D 2914 2915 if self.data.__class__.__name__== "Data2D": 2916 try: 2917 check = item[0].GetValue() 2918 except: 2919 check = None 2915 2920 name = item[1] 2916 2921 value = item[2].GetValue() … … 2919 2924 ## for 1D all parameters except orientation 2920 2925 if not item[1] in orient_param: 2926 try: 2927 check = item[0].GetValue() 2928 except: 2929 check = None 2921 2930 name = item[1] 2922 2931 value = item[2].GetValue() … … 2938 2947 pass 2939 2948 #if disfunc.count('array') == 0: 2940 content += name+ ',' + value + disfunc + ':'2949 content += name + ',' + str(check) + ',' + value + disfunc + ':' 2941 2950 2942 2951 return content … … 2982 2991 if len(line) != 0: 2983 2992 item =line.split(',') 2993 check = item[1] 2984 2994 name = item[0] 2985 value = item[ 1]2995 value = item[2] 2986 2996 # Transfer the text to content[dictionary] 2987 context[name] = [ value]2997 context[name] = [check, value] 2988 2998 # ToDo: PlugIn this poly disp function for pasting 2989 2999 try: 2990 poly_func = item[ 2]3000 poly_func = item[3] 2991 3001 context[name].append(poly_func) 2992 3002 try: 2993 3003 # take the vals and weights for array 2994 array_values = item[ 3].split(' ')2995 array_weights = item[ 4].split(' ')3004 array_values = item[4].split(' ') 3005 array_weights = item[5].split(' ') 2996 3006 val = [float(a_val) for a_val in array_values[1:]] 2997 3007 weit = [float(a_weit) for a_weit in array_weights[1:]] … … 3040 3050 name = item[1] 3041 3051 if name in content.keys(): 3042 pd = content[name][0] 3052 check = content[name][0] 3053 pd = content[name][1] 3043 3054 if name.count('.') > 0: 3044 3055 try: … … 3053 3064 item[2].Enable(False) 3054 3065 if item[2].__class__.__name__ == "ComboBox": 3055 if self.model.fun_list.has_key(content[name][ 0]):3056 fun_val = self.model.fun_list[content[name][ 0]]3066 if self.model.fun_list.has_key(content[name][1]): 3067 fun_val = self.model.fun_list[content[name][1]] 3057 3068 self.model.setParam(name,fun_val) 3058 3069 3059 value = content[name] 3070 value = content[name][1:] 3060 3071 self._paste_poly_help(item, value) 3061 # 1D 3072 if check == 'True': 3073 is_true = True 3074 elif check == 'False': 3075 is_true = False 3076 else: 3077 is_true = None 3078 if is_true != None: 3079 item[0].SetValue(is_true) 3080 # 1D 3062 3081 else: 3063 3082 ## for 1D all parameters except orientation … … 3065 3084 name = item[1] 3066 3085 if name in content.keys(): 3086 check = content[name][0] 3067 3087 # Avoid changing combox content which needs special care 3068 value = content[name] 3088 value = content[name][1:] 3069 3089 pd = value[0] 3070 3090 if name.count('.') > 0: … … 3087 3107 # self.state.str_parameters) 3088 3108 self._paste_poly_help(item, value) 3109 if check == 'True': 3110 is_true = True 3111 elif check == 'False': 3112 is_true = False 3113 else: 3114 is_true = None 3115 if is_true != None: 3116 item[0].SetValue(is_true) 3089 3117 3090 3118 def _paste_poly_help(self, item, value):
Note: See TracChangeset
for help on using the changeset viewer.