- Timestamp:
- Sep 9, 2018 6:46:30 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- f3cc979
- Parents:
- daf7c9c
- git-author:
- rozyczko <piotr.rozyczko@…> (09/09/18 06:44:20)
- git-committer:
- rozyczko <piotr.rozyczko@…> (09/09/18 06:46:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rdaf7c9c r13dd7d2 2796 2796 2797 2797 func = QtWidgets.QComboBox() 2798 # Available range of shells displayed in the combobox2799 func.addItems([str(i) for i in range(param_length+1)])2800 2801 # Respond to index change2802 func.currentIndexChanged.connect(self.modifyShellsInList)2803 2798 2804 2799 # cell 2: combobox 2805 2800 item2 = QtGui.QStandardItem() 2806 self._model_model.appendRow([item1, item2]) 2801 2802 # cell 3: min value 2803 item3 = QtGui.QStandardItem() 2804 2805 # cell 4: max value 2806 item4 = QtGui.QStandardItem() 2807 2808 self._model_model.appendRow([item1, item2, item3, item4]) 2807 2809 2808 2810 # Beautify the row: span columns 2-4 … … 2823 2825 logger.error("Could not find %s in kernel parameters.", param_name) 2824 2826 default_shell_count = shell_par.default 2827 shell_min = 0 2828 shell_max = 0 2829 try: 2830 shell_min = int(shell_par.limits[0]) 2831 shell_max = int(shell_par.limits[1]) 2832 except IndexError as ex: 2833 # no info about limits 2834 pass 2835 item3.setText(str(shell_min)) 2836 item4.setText(str(shell_max)) 2837 2838 # Respond to index change 2839 func.currentTextChanged.connect(self.modifyShellsInList) 2840 2841 # Available range of shells displayed in the combobox 2842 func.addItems([str(i) for i in range(shell_min, shell_max+1)]) 2825 2843 2826 2844 # Add default number of shells to the model 2827 func.setCurrent Index(default_shell_count)2828 2829 def modifyShellsInList(self, index):2845 func.setCurrentText(str(default_shell_count)) 2846 2847 def modifyShellsInList(self, text): 2830 2848 """ 2831 2849 Add/remove additional multishell parameters … … 2834 2852 first_row = self._n_shells_row + 1 2835 2853 remove_rows = self._num_shell_params 2854 try: 2855 index = int(text) 2856 except ValueError: 2857 # bad text on the control! 2858 index = 0 2859 logger.error("Multiplicity incorrect! Setting to 0") 2836 2860 2837 2861 if remove_rows > 1:
Note: See TracChangeset
for help on using the changeset viewer.