Ignore:
Timestamp:
Mar 21, 2018 8:26:17 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
3790f7f, fca1f50
Parents:
8b480d27
Message:

Analysis menu properly interacting with the perspective combo.
Fixed menu enablement for Fitting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/GuiManager.py

    r3b3b40b r8ac3551  
    4949    Main SasView window functionality 
    5050    """ 
    51  
    5251    def __init__(self, parent=None): 
    5352        """ 
     
    184183        Respond to change of the perspective signal 
    185184        """ 
    186  
    187         # Save users from themselves... 
    188         #if isinstance(self._current_perspective, Perspectives.PERSPECTIVES[str(perspective_name)]): 
    189         self.setupPerspectiveMenubarOptions(self._current_perspective) 
    190         #    return 
    191  
    192185        # Close the previous perspective 
    193186        self.clearPerspectiveMenubarOptions(self._current_perspective) 
     
    199192        # Default perspective 
    200193        self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](parent=self) 
     194 
     195        self.setupPerspectiveMenubarOptions(self._current_perspective) 
    201196 
    202197        subwindow = self._workspace.workspace.addSubWindow(self._current_perspective) 
     
    422417        self._workspace.actionInversion.triggered.connect(self.actionInversion) 
    423418        self._workspace.actionInvariant.triggered.connect(self.actionInvariant) 
     419        self._workspace.actionCorfunc.triggered.connect(self.actionCorfunc) 
    424420        # Help 
    425421        self._workspace.actionDocumentation.triggered.connect(self.actionDocumentation) 
     
    691687        """ 
    692688        self.perspectiveChanged("Fitting") 
     689        # Notify other widgets 
     690        self.filesWidget.onAnalysisUpdate("Fitting") 
    693691 
    694692    def actionInversion(self): 
     
    696694        Change to the Inversion perspective 
    697695        """ 
    698         # For now we'll just update the analysis menu status but when the inversion is implemented delete from here 
    699         self.checkAnalysisOption(self._workspace.actionInversion) 
    700         # to here and uncomment the following line 
    701696        self.perspectiveChanged("Inversion") 
     697        self.filesWidget.onAnalysisUpdate("Inversion") 
    702698 
    703699    def actionInvariant(self): 
     
    706702        """ 
    707703        self.perspectiveChanged("Invariant") 
     704        self.filesWidget.onAnalysisUpdate("Invariant") 
     705 
     706    def actionCorfunc(self): 
     707        """ 
     708        Change to the Corfunc perspective 
     709        """ 
     710        self.perspectiveChanged("Corfunc") 
     711        self.filesWidget.onAnalysisUpdate("Corfunc") 
    708712 
    709713    #============ WINDOW ================= 
     
    852856        elif isinstance(perspective, Perspectives.PERSPECTIVES["Invariant"]): 
    853857            self.checkAnalysisOption(self._workspace.actionInvariant) 
    854         # elif isinstance(perspective, Perspectives.PERSPECTIVES["Inversion"]): 
    855         #     self.checkAnalysisOption(self._workspace.actionInversion) 
     858        elif isinstance(perspective, Perspectives.PERSPECTIVES["Inversion"]): 
     859            self.checkAnalysisOption(self._workspace.actionInversion) 
     860        elif isinstance(perspective, Perspectives.PERSPECTIVES["Corfunc"]): 
     861            self.checkAnalysisOption(self._workspace.actionCorfunc) 
Note: See TracChangeset for help on using the changeset viewer.