Changeset 1d2782d in sasview for sansview/perspectives
- Timestamp:
- Mar 26, 2009 2:49:11 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:
- 1f57dfd
- Parents:
- a911b48
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpanel.py
rb28717b r1d2782d 71 71 # remove the check box link to the model name of this page (selected_page) 72 72 if self.sim_page !=None : 73 self.sim_page.draw_page( page_finder)73 self.sim_page.draw_page() 74 74 75 75 #Delete the page from notebook -
sansview/perspectives/fitting/simfitpage.py
ra911b48 r1d2782d 208 208 self.model_toFit=[] 209 209 self.constraints_list=[] 210 self.constraint_dict={} 211 self.nb_constraint= 0 212 210 213 if len(self.model_list)>0: 211 214 for item in self.model_list: … … 259 262 if len(self.model_toFit) < 2: 260 263 return 261 for page, value in self.page_finder.iteritems(): 262 model = value.get_model() 263 for item in self.model_toFit: 264 if model in item and not model in self.constraint_dict.keys(): 265 self.constraint_dict[model] = page 264 for item in self.model_toFit: 265 model = item[3] 266 page= item[2] 267 self.constraint_dict[page] = model 266 268 267 269 … … 290 292 if len(self.constraints_list)!= 0: 291 293 nb_fit_param = 0 292 for model in self.constraint_dict. keys():294 for model in self.constraint_dict.values(): 293 295 nb_fit_param += len(get_fittableParam(model)) 294 296 ##Don't add anymore … … 323 325 324 326 325 for model, valuein self.constraint_dict.iteritems():327 for page,model in self.constraint_dict.iteritems(): 326 328 ## check if all parameters have been selected for constraint 327 329 ## then do not allow add constraint on parameters … … 354 356 hide buttons related constraint 355 357 """ 356 if len(self.constraints_list)>0: 357 for item in self.constraints_list: 358 model = item[0].GetClientData(item[0].GetCurrentSelection()) 359 if model in self.constraint_dict.keys(): 360 page = self.constraint_dict[model] 361 self.page_finder[page].clear_model_param() 358 for page in self.page_finder.iterkeys(): 359 self.page_finder[page].clear_model_param() 362 360 363 361 self.nb_constraint =0
Note: See TracChangeset
for help on using the changeset viewer.