Changeset fa81e94 in sasview for src/sas/sasgui/perspectives/fitting/simfitpage.py
- Timestamp:
- Nov 15, 2017 4:33:09 AM (7 years ago)
- Branches:
- 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
- Children:
- d4881f6a
- Parents:
- 7c487846
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/simfitpage.py
- Property mode changed from 100644 to 100755
r0a3c740 rfa81e94 168 168 i = 0 169 169 for model in self.model_list: 170 model_id = self._format_id( model[1].keys()[0])170 model_id = self._format_id(list(model[1].keys())[0]) 171 171 for saved_model in sim_state.model_list: 172 172 save_id = saved_model.pop('name') … … 195 195 param = item.pop('param_cbox') 196 196 equality = item.pop('egal_txt') 197 for key, value in init_map.items():197 for key, value in list(init_map.items()): 198 198 model_cbox = model_cbox.replace(key, value) 199 199 constraint_value = constraint_value.replace(key, value) 200 for key, value in final_map.items():200 for key, value in list(final_map.items()): 201 201 model_cbox = model_cbox.replace(key, value) 202 202 constraint_value = constraint_value.replace(key, value) … … 328 328 sizer.Add(tab_used, (iy, ix), (1, 1), 329 329 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 330 for id, value in self.page_finder.ite ritems():330 for id, value in self.page_finder.items(): 331 331 if id not in self.parent.opened_pages: 332 332 continue … … 757 757 self.set_button.Disable() 758 758 759 for id, model in self.constraint_dict.ite ritems():759 for id, model in self.constraint_dict.items(): 760 760 # check if all parameters have been selected for constraint 761 761 # then do not allow add constraint on parameters 762 762 self.model_cbox_left.Append(str(model.name), model) 763 763 self.model_cbox_left.Select(0) 764 for id, model in self.constraint_dict.ite ritems():764 for id, model in self.constraint_dict.items(): 765 765 # check if all parameters have been selected for constraint 766 766 # then do not allow add constraint on parameters … … 814 814 model_right = self.model_cbox_right.GetValue() 815 815 model_b = self.model_cbox_right.GetClientData(selection_b) 816 for id, dic_model in self.constraint_dict.ite ritems():816 for id, dic_model in self.constraint_dict.items(): 817 817 if model == dic_model: 818 818 param_list = self.page_finder[id].get_param2fit() … … 857 857 if len(self.constraints_list) != 0: 858 858 nb_fit_param = 0 859 for id, model in self.constraint_dict.ite ritems():859 for id, model in self.constraint_dict.items(): 860 860 nb_fit_param += len(self.page_finder[id].get_param2fit()) 861 861 # Don't add anymore … … 879 879 model_cbox = wx.ComboBox(self, wx.ID_ANY, style=wx.CB_READONLY) 880 880 model_cbox.Clear() 881 for id, model in self.constraint_dict.ite ritems():881 for id, model in self.constraint_dict.items(): 882 882 # check if all parameters have been selected for constraint 883 883 # then do not allow add constraint on parameters … … 898 898 # Remove button 899 899 #btRemove = wx.Button(self, self.ID_REMOVE, 'Remove') 900 bt_remove = wx.Button(self, self._ids.next(), 'Remove')900 bt_remove = wx.Button(self, next(self._ids), 'Remove') 901 901 bt_remove.Bind(wx.EVT_BUTTON, self.on_remove, 902 902 id=bt_remove.GetId()) … … 931 931 hide buttons related constraint 932 932 """ 933 for id in self.page_finder. iterkeys():933 for id in self.page_finder.keys(): 934 934 self.page_finder[id].clear_model_param() 935 935 … … 969 969 model = model_cbox.GetClientData(n) 970 970 param_list = [] 971 for id, dic_model in self.constraint_dict.ite ritems():971 for id, dic_model in self.constraint_dict.items(): 972 972 if model == dic_model: 973 973 param_list = self.page_finder[id].get_param2fit() … … 1056 1056 msg += " in combobox to set constraint! " 1057 1057 wx.PostEvent(self.parent.parent, StatusEvent(status=msg)) 1058 for id, value in self.constraint_dict.ite ritems():1058 for id, value in self.constraint_dict.items(): 1059 1059 if model == value: 1060 1060 if constraint == "": … … 1080 1080 return False 1081 1081 1082 for fid in self.page_finder[id]. iterkeys():1082 for fid in self.page_finder[id].keys(): 1083 1083 # wrap in param/constraint in str() to remove unicode 1084 1084 self.page_finder[id].set_model_param(str(param),
Note: See TracChangeset
for help on using the changeset viewer.