Changeset c647377 in sasview
- Timestamp:
- Aug 26, 2011 10:22:36 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:
- ad3fa1e
- Parents:
- 7e7e806
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/simfitpage.py
r49c69de rc647377 137 137 if self.show_constraint.GetValue(): 138 138 self._set_constraint() 139 ## get the fit range of very fit problem140 for id, value in self.page_finder.iteritems():141 qmin, qmax= self.page_finder[id].get_range()142 value.set_range(qmin, qmax)143 139 ## model was actually selected from this page to be fit 144 140 if len(self.model_toFit) >= 1 : … … 146 142 for item in self.model_list: 147 143 if item[0].GetValue(): 148 self.manager.schedule_for_fit( value=1, fitproblem =item[1])144 self.manager.schedule_for_fit(value=1, uid=item[2]) 149 145 self.manager.onFit(None) 150 146 else: 151 147 msg= "Select at least one model to fit " 152 wx.PostEvent(self.parent.Parent, StatusEvent(status= msg))148 wx.PostEvent(self.parent.Parent, StatusEvent(status=msg)) 153 149 154 150 def set_manager(self, manager): … … 227 223 for item in self.model_list: 228 224 item[0].SetValue(False) 229 self.manager.schedule_for_fit( value=0,fitproblem =item[1])225 self.manager.schedule_for_fit(value=0, uid=item[2]) 230 226 231 227 self.sizer1.Clear(True) … … 551 547 wx.PostEvent(self.parent.Parent, StatusEvent(status= msg )) 552 548 constraint = None 553 self.page_finder[id].set_model_param(param,constraint) 549 for fid in self.page_finder[id].iterkeys(): 550 self.page_finder[id].set_model_param(param, 551 constraint, fid=fid) 554 552 break 555 553 … … 589 587 ix = 0 590 588 iy += 1 591 model = value.get_model() 592 name = '_' 593 if model is not None: 594 name = str(model.name) 595 cb = wx.CheckBox(self, -1, name) 596 cb.SetValue(False) 597 cb.Enable(model is not None) 598 sizer.Add( cb,( iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 599 wx.EVT_CHECKBOX(self, cb.GetId(), self.check_model_name) 600 ix += 2 601 type = model.__class__.__name__ 602 model_type = wx.StaticText(self, -1, str(type)) 603 sizer.Add(model_type,( iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 604 data = value.get_fit_data() 605 name = '-' 606 if data is not None: 607 name = str(data.name) 608 data_used = wx.StaticText(self, -1, name) 609 ix += 1 610 sizer.Add(data_used,( iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 589 for fitproblem in value.get_fit_problem(): 590 model = fitproblem.get_model() 591 name = '_' 592 if model is not None: 593 name = str(model.name) 594 cb = wx.CheckBox(self, -1, name) 595 cb.SetValue(False) 596 cb.Enable(model is not None) 597 sizer.Add(cb, (iy, ix), (1, 1), 598 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 599 wx.EVT_CHECKBOX(self, cb.GetId(), self.check_model_name) 600 ix += 2 601 type = model.__class__.__name__ 602 model_type = wx.StaticText(self, -1, str(type)) 603 sizer.Add(model_type, (iy, ix), (1, 1), 604 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 605 data = fitproblem.get_fit_data() 606 name = '-' 607 if data is not None: 608 name = str(data.name) 609 data_used = wx.StaticText(self, -1, name) 610 ix += 1 611 sizer.Add(data_used, (iy, ix), (1, 1), 612 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 613 ix += 1 614 caption = value.get_fit_tab_caption() 615 tab_caption_used= wx.StaticText(self, -1, str(caption)) 616 sizer.Add(tab_caption_used, (iy, ix), (1, 1), 617 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 611 618 612 ix += 1613 caption = value.get_fit_tab_caption()614 tab_caption_used= wx.StaticText(self, -1, str(caption))615 sizer.Add(tab_caption_used,( iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)616 617 619 self.model_list.append([cb,value,id,model]) 618 620 … … 621 623 #pass 622 624 iy += 1 623 sizer.Add((20,20),( iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 625 sizer.Add((20, 20), (iy, ix), (1, 1), 626 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 624 627 sizer.Layout() 628
Note: See TracChangeset
for help on using the changeset viewer.