Changes in / [28965e9:9b17efd] in sasview
- Location:
- src/sas/qtgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r70f4458 rf3cc979 128 128 129 129 # Find param in volume_params 130 for p in parameters.form_volume_parameters: 130 poly_pars = parameters.form_volume_parameters 131 if is2D: 132 poly_pars += parameters.orientation_parameters 133 for p in poly_pars: 131 134 if p.name != param.name: 132 135 continue -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rbb477f5 rf3cc979 1219 1219 if model_column in [delegate.poly_pd, delegate.poly_error, delegate.poly_min, delegate.poly_max]: 1220 1220 row = self.getRowFromName(parameter_name) 1221 param_item = self._model_model.item(row) 1221 param_item = self._model_model.item(row).child(0).child(0, model_column) 1222 if param_item is None: 1223 return 1222 1224 self._model_model.blockSignals(True) 1223 param_item. child(0).child(0, model_column).setText(item.text())1225 param_item.setText(item.text()) 1224 1226 self._model_model.blockSignals(False) 1225 1227 … … 2796 2798 2797 2799 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 2800 2804 2801 # cell 2: combobox 2805 2802 item2 = QtGui.QStandardItem() 2806 self._model_model.appendRow([item1, item2]) 2803 2804 # cell 3: min value 2805 item3 = QtGui.QStandardItem() 2806 2807 # cell 4: max value 2808 item4 = QtGui.QStandardItem() 2809 2810 self._model_model.appendRow([item1, item2, item3, item4]) 2807 2811 2808 2812 # Beautify the row: span columns 2-4 … … 2823 2827 logger.error("Could not find %s in kernel parameters.", param_name) 2824 2828 default_shell_count = shell_par.default 2829 shell_min = 0 2830 shell_max = 0 2831 try: 2832 shell_min = int(shell_par.limits[0]) 2833 shell_max = int(shell_par.limits[1]) 2834 except IndexError as ex: 2835 # no info about limits 2836 pass 2837 item3.setText(str(shell_min)) 2838 item4.setText(str(shell_max)) 2839 2840 # Respond to index change 2841 func.currentTextChanged.connect(self.modifyShellsInList) 2842 2843 # Available range of shells displayed in the combobox 2844 func.addItems([str(i) for i in range(shell_min, shell_max+1)]) 2825 2845 2826 2846 # Add default number of shells to the model 2827 func.setCurrent Index(default_shell_count)2828 2829 def modifyShellsInList(self, index):2847 func.setCurrentText(str(default_shell_count)) 2848 2849 def modifyShellsInList(self, text): 2830 2850 """ 2831 2851 Add/remove additional multishell parameters … … 2834 2854 first_row = self._n_shells_row + 1 2835 2855 remove_rows = self._num_shell_params 2856 try: 2857 index = int(text) 2858 except ValueError: 2859 # bad text on the control! 2860 index = 0 2861 logger.error("Multiplicity incorrect! Setting to 0") 2836 2862 2837 2863 if remove_rows > 1: … … 2848 2874 self.current_shell_displayed = index 2849 2875 2850 # Change 'n' in the parameter model, thereby updating the underlying model 2876 # Param values for existing shells were reset to default; force all changes into kernel module 2877 for row in new_rows: 2878 par = row[0].text() 2879 val = GuiUtils.toDouble(row[1].text()) 2880 self.kernel_module.setParam(par, val) 2881 2882 # Change 'n' in the parameter model; also causes recalculation 2851 2883 self._model_model.item(self._n_shells_row, 1).setText(str(index)) 2852 2884 -
src/sas/qtgui/Plotting/PlotterBase.py
rd9150d8 r343d7fd 10 10 11 11 import matplotlib.pyplot as plt 12 from matplotlib import rcParams 12 13 13 14 DEFAULT_CMAP = pylab.cm.jet … … 29 30 self.manager = manager 30 31 self.quickplot = quickplot 32 33 # Set auto layout so x/y axis captions don't get cut off 34 rcParams.update({'figure.autolayout': True}) 31 35 32 36 #plt.style.use('ggplot')
Note: See TracChangeset
for help on using the changeset viewer.