Changeset f20ea3f in sasview for src


Ignore:
Timestamp:
Oct 9, 2018 3:59:18 PM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
345b3b3, efaf022
Parents:
b14db78
Message:

Block signals while remaking combobox list. Redo the combo list when
data loaded into widget with existing model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/SmearingWidget.py

    rb14db78 rf20ea3f  
    115115        if data is None: 
    116116            self.setElementsVisibility(False) 
     117        if self.kernel_model is not None: 
     118            # model already present - recalculate 
     119            model = self.kernel_model 
     120            self.updateKernelModel(model) 
    117121 
    118122    def updateKernelModel(self, kernel_model=None): 
     
    121125        """ 
    122126        self.kernel_model = kernel_model 
     127        self.cbSmearing.blockSignals(True) 
    123128        self.cbSmearing.clear() 
    124129        self.cbSmearing.addItem("None") 
     
    130135        # Find out if data has dQ 
    131136        (self.smear_type, self.dq_l, self.dq_r) = self.getSmearInfo() 
     137        index_to_show = 0 
    132138        if self.smear_type is not None: 
    133139            self.cbSmearing.addItem(SMEARING_QD) 
     140            index_to_show = 1 
    134141        if isinstance(self.data, Data1D): 
    135142            self.cbSmearing.addItems(SMEARING_1D) 
    136143        else: 
    137144            self.cbSmearing.addItems(SMEARING_2D) 
    138         self.cbSmearing.setCurrentIndex(0) 
     145        self.cbSmearing.blockSignals(False) 
     146        self.cbSmearing.setCurrentIndex(index_to_show) 
    139147 
    140148    def smearer(self): 
Note: See TracChangeset for help on using the changeset viewer.