- Timestamp:
- Mar 24, 2017 10:06:37 AM (8 years ago)
- 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
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
rb1e36a3 ra9b568c 21 21 """ 22 22 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) 26 31 27 32 def addParametersToModel(parameters, model): -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
ra0f5c36 ra9b568c 66 66 self.tab_id = id 67 67 68 # Which shell is being currently displayed? 69 self.current_shell_displayed = 0 70 68 71 # Range parameters 69 72 self.q_range_min = QMIN_DEFAULT … … 420 423 self.setMagneticModel() 421 424 425 # Adjust the table cells width 426 self.lstParams.resizeColumnToContents(0) 427 self.lstParams.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Expanding) 428 422 429 # Now we claim the model has been loaded 423 430 self.model_is_loaded = True … … 719 726 # Available range of shells displayed in the combobox 720 727 func.addItems([str(i) for i in xrange(param_length+1)]) 728 721 729 # Respond to index change 722 730 func.currentIndexChanged.connect(self.modifyShellsInList) … … 733 741 self._last_model_row = self._model_model.rowCount() 734 742 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 735 747 def modifyShellsInList(self, index): 736 748 """ … … 745 757 746 758 FittingUtilities.addShellsToModel(self.model_parameters, self._model_model, index) 759 self.current_shell_displayed = index 747 760 748 761 def togglePoly(self, isChecked):
Note: See TracChangeset
for help on using the changeset viewer.