Changeset 7945367 in sasview for src/sas/perspectives/fitting


Ignore:
Timestamp:
Aug 21, 2015 6:17:40 PM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
600bea1
Parents:
a342928
Message:

make Fit Options dialog persistent and add Help button [NB: awaiting new bumps release]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/fitting.py

    r225aca8 r7945367  
    4444from sas.perspectives.calculator.model_editor import EditorWindow 
    4545from sas.guiframe.gui_manager import MDIFrame 
     46from sas.guiframe.documentation_window import DocumentationWindow 
    4647 
    4748MAX_NBR_DATA = 4 
     
    748749        Open the bumps options panel. 
    749750        """ 
    750         from bumps.gui.fit_dialog import OpenFitOptions 
    751         OpenFitOptions() 
     751        try: 
     752            from bumps.gui.fit_dialog import show_fit_config 
     753            show_fit_config(self.parent, help=self.on_help) 
     754        except ImportError: 
     755            # CRUFT: Bumps 0.7.5.6 and earlier do not have the help button 
     756            from bumps.gui.fit_dialog import OpenFitOptions 
     757            OpenFitOptions() 
     758 
     759    def on_help(self, algorithm_id): 
     760        _TreeLocation = "user/perspectives/fitting/optimizer.html" 
     761        _anchor = "#fit-"+algorithm_id 
     762        DocumentationWindow(self.parent, -1, _TreeLocation, _anchor, "Optimizer Help") 
     763 
    752764 
    753765    def on_fit_results(self, event=None): 
Note: See TracChangeset for help on using the changeset viewer.