Changeset 133812c7 in sasview for src/sas/qtgui/Calculators


Ignore:
Timestamp:
Nov 12, 2018 6:47:59 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:
e5ae812
Parents:
ebcdb02
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (10/31/18 06:34:14)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (11/12/18 06:47:59)
Message:

Merged ESS_GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/GenericScatteringCalculator.py

    r30e0be0 r133812c7  
    3333    trigger_plot_3d = QtCore.pyqtSignal() 
    3434    calculationFinishedSignal = QtCore.pyqtSignal() 
     35    loadingFinishedSignal = QtCore.pyqtSignal(list) 
    3536 
    3637    def __init__(self, parent=None): 
     
    104105        # plots - 3D in real space 
    105106        self.calculationFinishedSignal.connect(self.plot_1_2d) 
     107 
     108        # notify main thread about file load complete 
     109        self.loadingFinishedSignal.connect(self.complete_loading) 
    106110 
    107111        # TODO the option Ellipsoid has not been implemented 
     
    167171                        str(self.datafile)))) 
    168172                self.reader = GenReader(path=str(self.datafile), loader=loader, 
    169                                         completefn=self.complete_loading, 
     173                                        completefn=self.complete_loading_ex, 
    170174                                        updatefn=self.load_update) 
    171175                self.reader.queue() 
     
    184188        logging.info(status_type) 
    185189 
     190    def complete_loading_ex(self, data=None): 
     191        """ 
     192        Send the finish message from calculate threads to main thread 
     193        """ 
     194        self.loadingFinishedSignal.emit(data) 
     195 
    186196    def complete_loading(self, data=None): 
    187197        """ Function used in GenRead""" 
     198        assert isinstance(data, list) 
     199        assert len(data)==1 
     200        data = data[0] 
    188201        self.cbShape.setEnabled(False) 
    189202        try: 
Note: See TracChangeset for help on using the changeset viewer.