Changes in src/sas/sasgui/perspectives/fitting/fitting.py [86b049b:243fbc0] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitting.py
r86b049b r243fbc0 56 56 ON_MAC = True 57 57 58 58 import bumps.options 59 from bumps.gui.fit_dialog import show_fit_config 60 try: 61 from bumps.gui.fit_dialog import EVT_FITTER_CHANGED 62 except ImportError: 63 # CRUFT: bumps 0.7.5.8 and below 64 EVT_FITTER_CHANGED = None # type: wx.PyCommandEvent 59 65 60 66 class Plugin(PluginBase): … … 501 507 self.parent.Bind(EVT_SLICER_PANEL, self._on_slicer_event) 502 508 self.parent.Bind(EVT_SLICER_PARS_UPDATE, self._onEVT_SLICER_PANEL) 509 510 # CRUFT: EVT_FITTER_CHANGED is not None for bumps 0.7.5.9 and above 511 if EVT_FITTER_CHANGED is not None: 512 self.parent.Bind(EVT_FITTER_CHANGED, self.on_fitter_changed) 513 self._set_fitter_label(bumps.options.FIT_CONFIG) 514 503 515 #self.parent._mgr.Bind(wx.aui.EVT_AUI_PANE_CLOSE,self._onclearslicer) 504 516 #Create reader when fitting panel are created … … 763 775 Open the bumps options panel. 764 776 """ 765 try: 766 from bumps.gui.fit_dialog import show_fit_config 767 show_fit_config(self.parent, help=self.on_help) 768 except ImportError: 769 # CRUFT: Bumps 0.7.5.6 and earlier do not have the help button 770 from bumps.gui.fit_dialog import OpenFitOptions 771 OpenFitOptions() 777 show_fit_config(self.parent, help=self.on_help) 778 779 def on_fitter_changed(self, event): 780 self._set_fitter_label(event.config) 781 782 def _set_fitter_label(self, config): 783 self.fit_panel.parent.SetTitle(self.fit_panel.window_name 784 + " - Active Fitting Optimizer: " 785 + config.selected_name) 772 786 773 787 def on_help(self, algorithm_id):
Note: See TracChangeset
for help on using the changeset viewer.