Changeset a9b568c in sasview


Ignore:
Timestamp:
Mar 24, 2017 10:06:37 AM (2 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:
6fd4e36
Parents:
a0f5c36
Message:

Sprint demo issues addressed.

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
2 edited

Legend:

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

    rb1e36a3 ra9b568c  
    2121    """ 
    2222    iter_params = getIterParams(model) 
    23     # return the iterator parameter name and length 
    24     return (iter_params[0].length_control if iter_params else "", 
    25             iter_params[0].length if iter_params else 0) 
     23    param_name = "" 
     24    param_length = 0 
     25    if iter_params: 
     26        param_length = iter_params[0].length 
     27        param_name = iter_params[0].length_control 
     28        if param_name is None and '[' in iter_params[0].name: 
     29            param_name = iter_params[0].name[:iter_params[0].name.index('[')] 
     30    return (param_name, param_length) 
    2631 
    2732def addParametersToModel(parameters, model): 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    ra0f5c36 ra9b568c  
    6666        self.tab_id = id 
    6767 
     68        # Which shell is being currently displayed? 
     69        self.current_shell_displayed = 0 
     70 
    6871        # Range parameters 
    6972        self.q_range_min = QMIN_DEFAULT 
     
    420423        self.setMagneticModel() 
    421424 
     425        # Adjust the table cells width 
     426        self.lstParams.resizeColumnToContents(0) 
     427        self.lstParams.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding) 
     428 
    422429        # Now we claim the model has been loaded 
    423430        self.model_is_loaded = True 
     
    719726        # Available range of shells displayed in the combobox 
    720727        func.addItems([str(i) for i in xrange(param_length+1)]) 
     728 
    721729        # Respond to index change 
    722730        func.currentIndexChanged.connect(self.modifyShellsInList) 
     
    733741        self._last_model_row = self._model_model.rowCount() 
    734742 
     743        # Set the index to the state-kept value 
     744        func.setCurrentIndex(self.current_shell_displayed 
     745                             if self.current_shell_displayed < func.count() else 0) 
     746 
    735747    def modifyShellsInList(self, index): 
    736748        """ 
     
    745757 
    746758        FittingUtilities.addShellsToModel(self.model_parameters, self._model_model, index) 
     759        self.current_shell_displayed = index 
    747760 
    748761    def togglePoly(self, isChecked): 
Note: See TracChangeset for help on using the changeset viewer.