Changes in / [951701c:775e0b7] in sasview


Ignore:
Location:
src/sas/sasgui/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    r2d568f6 r3d55219  
    164164        On_select_data 
    165165        """ 
    166         if self.dataSource.GetCount() > 0: 
    167             pos = self.dataSource.GetSelection() if event is not None else 0 
     166        if event is None and self.dataSource.GetCount() > 0: 
     167            data = self.dataSource.GetClientData(0) 
     168            self.set_data(data) 
     169        elif self.dataSource.GetCount() > 0: 
     170            pos = self.dataSource.GetSelection() 
    168171            data = self.dataSource.GetClientData(pos) 
    169172            self.set_data(data) 
     
    253256        self.Bind(wx.EVT_RADIOBUTTON, self.onWeighting, 
    254257                  id=self.dI_idata.GetId()) 
    255         self.dI_noweight.SetValue(True) 
     258        self.dI_didata.SetValue(True) 
    256259        # add 4 types of weighting to the sizer 
    257260        sizer_weighting.Add(self.dI_noweight, 0, wx.LEFT, 10) 
     
    263266        sizer_weighting.Add(self.dI_idata) 
    264267        sizer_weighting.Add((10, 10)) 
    265         self.dI_noweight.Enable(True) 
     268        self.dI_noweight.Enable(False) 
    266269        self.dI_didata.Enable(False) 
    267270        self.dI_sqrdata.Enable(False) 
     
    12681271            if copy_flag: 
    12691272                self.get_paste_params(copy_flag) 
    1270             wx.CallAfter(self._onDraw, None) 
     1273                wx.CallAfter(self._onDraw, None) 
    12711274 
    12721275        else: 
     
    16241627        elif data.dxl is not None or data.dxw is not None: 
    16251628            self.smear_type = "Slit" 
    1626             if data.dxl is not None and numpy.all(data.dxl, 0): 
     1629            if data.dxl is not None and not numpy.all(data.dxl, 0): 
    16271630                self.dq_l = data.dxl[0] 
    1628             if data.dxw is not None and numpy.all(data.dxw, 0): 
     1631            if data.dxw is not None and not numpy.all(data.dxw, 0): 
    16291632                self.dq_r = data.dxw[0] 
    16301633        # return self.smear_type,self.dq_l,self.dq_r 
     
    20132016            self.EditMask_title.Disable() 
    20142017 
    2015         self.on_smear_helper() 
     2018        self.onSmear(event=None) 
    20162019        self.on_set_focus(None) 
    20172020        self.Refresh() 
  • src/sas/sasgui/perspectives/fitting/model_thread.py

    rc1c9929 rc1681ea  
    177177            unsmeared_output = numpy.zeros((len(self.data.x))) 
    178178            unsmeared_output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 
    179             self.smearer.model = self.model 
    180179            output = self.smearer(unsmeared_output, first_bin, last_bin) 
    181180 
Note: See TracChangeset for help on using the changeset viewer.