Changeset ebf86f1 in sasview


Ignore:
Timestamp:
Nov 12, 2018 4:28:14 AM (5 years ago)
Author:
wojciech
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:
859d960, 5f9e874
Parents:
5584dee
Message:

Fixing failing Generic Scattering Calculator on OMF file on Linux

Location:
src/sas/qtgui
Files:
2 edited

Legend:

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

    r30e0be0 rebf86f1  
    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: 
  • src/sas/qtgui/Utilities/GenericReader.py

    re7a0b2f rebf86f1  
    4141        try: 
    4242            data = self.loader.read(self.path) 
    43             self.complete(data=data) 
     43            self.complete(data=[data]) 
    4444        except: 
    4545            # Thread was interrupted, just proceed and re-raise. 
Note: See TracChangeset for help on using the changeset viewer.