Ignore:
Timestamp:
Oct 19, 2018 5:25:25 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
b8dccb8
Parents:
10d57f6
Message:

Working version of Save/Load? Analysis. SASVIEW-983.
Changed the default behaviour of Category/Model? combos:
Selecting a category does not pre-select the first model now.

File:
1 edited

Legend:

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

    r6040cd7 r2eeda93  
    244244        if self._current_perspective: 
    245245            self._current_perspective.setClosable() 
    246             #self._workspace.workspace.removeSubWindow(self._current_perspective) 
    247246            self._current_perspective.close() 
    248247            self._workspace.workspace.removeSubWindow(self._current_perspective) 
     
    548547        """ 
    549548        """ 
    550         print("actionOpen_Analysis TRIGGERED") 
     549        self.filesWidget.loadAnalysis() 
    551550        pass 
    552551 
     
    561560        Menu File/Save Analysis 
    562561        """ 
    563         self.communicate.saveAnalysisSignal.emit() 
     562        per = self.perspective() 
     563        if not isinstance(per, FittingWindow): 
     564            return 
     565        # get fit page serialization 
     566        params = per.getSerializedFitpage() 
     567        data_id = per.currentTabDataId() 
     568        tab_id = per.currentTab.tab_id 
     569        data = self.filesWidget.getDataForID(data_id) 
     570        analysis = {} 
     571        analysis['fit_data'] = data 
     572        analysis['fit_params'] = params 
     573 
     574        self.filesWidget.saveAnalysis(analysis, tab_id) 
     575 
     576        pass 
    564577 
    565578    def actionQuit(self): 
     
    10231036        """ 
    10241037        self._workspace.actionReport.setEnabled(False) 
     1038        self._workspace.actionOpen_Analysis.setEnabled(False) 
     1039        self._workspace.actionSave_Analysis.setEnabled(False) 
     1040        if hasattr(perspective, 'isSerializable') and perspective.isSerializable(): 
     1041            self._workspace.actionOpen_Analysis.setEnabled(True) 
     1042            self._workspace.actionSave_Analysis.setEnabled(True) 
     1043 
    10251044        if isinstance(perspective, Perspectives.PERSPECTIVES["Fitting"]): 
    10261045            self.checkAnalysisOption(self._workspace.actionFitting) 
Note: See TracChangeset for help on using the changeset viewer.