Ignore:
Timestamp:
Sep 20, 2017 4:19:54 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
adc49fc
Parents:
e694f0f
Message:

Fix fitting table behaviour for when the error column is added

File:
1 edited

Legend:

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

    r8a32a6ff r8f2548c  
    871871 
    872872        error_column = [] 
     873        self.lstParams.itemDelegate().addErrorColumn() 
    873874        self.iterateOverModel(createErrorColumn) 
    874875 
     
    12691270            return 
    12701271        parameter_name = str(self._model_model.data(name_index).toPyObject()) # sld, background etc. 
    1271         property_index = self._model_model.headerData(1, model_column).toInt()[0]-1 # Value, min, max, etc. 
    12721272 
    12731273        # Update the parameter value - note: this supports +/-inf as well 
     
    12751275 
    12761276        # Update the parameter value - note: this supports +/-inf as well 
    1277         if model_column == 0: 
     1277        param_column = self.lstParams.itemDelegate().param_value 
     1278        min_column = self.lstParams.itemDelegate().param_min 
     1279        max_column = self.lstParams.itemDelegate().param_max 
     1280        if model_column == param_column: 
    12781281            self.kernel_module.setParam(parameter_name, value) 
     1282        elif model_column == min_column: 
     1283            # min/max to be changed in self.kernel_module.details[parameter_name] = ['Ang', 0.0, inf] 
     1284            self.kernel_module.details[parameter_name][1] = value 
     1285        elif model_column == max_column: 
     1286            self.kernel_module.details[parameter_name][2] = value 
    12791287        else: 
    1280             # min/max to be changed in self.kernel_module.details[parameter_name] = ['Ang', 0.0, inf] 
    1281             self.kernel_module.details[parameter_name][property_index] = value 
     1288            # don't update the chart 
     1289            return 
    12821290 
    12831291        # TODO: magnetic params in self.kernel_module.details['M0:parameter_name'] = value 
Note: See TracChangeset for help on using the changeset viewer.