Changeset 2d0e0c1 in sasview
- Timestamp:
- Jun 14, 2017 1:58:59 AM (7 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:
- 1643d8ed
- Parents:
- 125c4be
- Location:
- src/sas/qtgui
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
rdc5ef15 r2d0e0c1 612 612 """ 613 613 """ 614 print("actionFit_Options TRIGGERED") 614 if getattr(self._current_perspective, "fit_options_widget"): 615 self._current_perspective.fit_options_widget.show() 615 616 pass 616 617 -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r125c4be r2d0e0c1 4 4 from PyQt4 import QtGui 5 5 6 from bumps import options 7 from bumps import fitters 8 6 9 import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 7 10 8 11 from sas.qtgui.Perspectives.Fitting.FittingWidget import FittingWidget 12 from sas.qtgui.Perspectives.Fitting.FittingOptions import FittingOptions 9 13 from sas.qtgui.Perspectives.Fitting import ModelUtilities 10 14 … … 45 49 self._allow_close = False 46 50 51 # Fit options - uniform for all tabs 52 self.fit_options = options.FIT_CONFIG 53 self.fit_options_widget = FittingOptions(self, config=self.fit_options) 54 self.fit_options.selected_id = fitters.LevenbergMarquardtFit.id 55 56 # Listen to GUI Manager signal updating fit options 57 self.fit_options_widget.fit_option_changed.connect(self.onFittingOptionsChange) 58 47 59 self.menu_manager = ModelUtilities.ModelManager() 48 60 # TODO: reuse these in FittingWidget properly … … 50 62 self.model_dictionary = self.menu_manager.get_model_dictionary() 51 63 64 #self.setWindowTitle('Fit panel - Active Fitting Optimizer: %s' % self.optimizer) 65 self.updateWindowTitle() 66 67 def updateWindowTitle(self): 68 """ 69 Update the window title with the current optimizer name 70 """ 71 self.optimizer = self.fit_options.selected_name 52 72 self.setWindowTitle('Fit panel - Active Fitting Optimizer: %s' % self.optimizer) 73 53 74 54 75 def setClosable(self, value=True): … … 137 158 else: 138 159 self.addFit(data) 160 161 def onFittingOptionsChange(self, fit_engine, fit_options): 162 """ 163 """ 164 fitter = [f.id for f in options.FITTERS if f.name == str(fit_engine)][0] 165 166 # set the optimizer 167 self.fit_options.selected_id = str(fitter) 168 # set the options 169 # 170 # Update the title 171 self.updateWindowTitle() 172 173 pass
Note: See TracChangeset
for help on using the changeset viewer.