Ignore:
Timestamp:
Apr 9, 2017 5:33:01 AM (8 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:
9208346
Parents:
71361f0
Message:

Add display of orientational parameters + minor refactoring

File:
1 edited

Legend:

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

    rd7ff531 r1970780  
    201201        self.chkMagnetism.setEnabled(isChecked) 
    202202        self.is2D = isChecked 
     203        # Reload the current model 
     204        self.onSelectModel() 
    203205 
    204206    def initializeControls(self): 
     
    671673 
    672674        # Update the QModel 
    673         FittingUtilities.addParametersToModel(self.model_parameters, self._model_model) 
     675        new_rows = FittingUtilities.addParametersToModel(self.model_parameters, self.is2D) 
     676        for row in new_rows: 
     677            self._model_model.appendRow(row) 
    674678        # Update the counter used for multishell display 
    675679        self._last_model_row = self._model_model.rowCount() 
     
    681685            structure_module = generate.load_kernel_module(structure_factor) 
    682686            structure_parameters = modelinfo.make_parameter_table(getattr(structure_module, 'parameters', [])) 
    683             FittingUtilities.addSimpleParametersToModel(structure_parameters, self._model_model) 
     687            new_rows = FittingUtilities.addSimpleParametersToModel(structure_parameters, self.is2D) 
     688            for row in new_rows: 
     689                self._model_model.appendRow(row) 
    684690            # Update the counter used for multishell display 
    685691            self._last_model_row = self._model_model.rowCount() 
     
    724730 
    725731        self.kernel_module.params[parameter_name] = value 
    726         print "UPDATED %s / %s with %0.3f." %(parameter_name, property_name, value) 
    727732 
    728733        # min/max to be changed in self.kernel_module.details[parameter_name] = ['Ang', 0.0, inf] 
Note: See TracChangeset for help on using the changeset viewer.