Changeset 10786bc2 in sasview for src/sas/qtgui


Ignore:
Timestamp:
Jan 7, 2019 9:46:27 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
Children:
d1ad101
Parents:
04a884a
Message:

Added missing types for (de)serialization. SASVIEW-984

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GuiUtils.py

    r04a884a r10786bc2  
    3030from sas.qtgui.Plotting.Plottables import Plottable 
    3131from sas.sascalc.dataloader.data_info import Sample, Source, Vector 
     32from sas.sascalc.dataloader.data_info import Detector, Process, TransmissionSpectrum 
     33from sas.sascalc.dataloader.data_info import Aperture, Collimation 
    3234from sas.qtgui.Plotting.Plottables import View 
    3335from sas.qtgui.Plotting.Plottables import PlottableTheory1D 
     
    11811183        if isinstance(o, (Sample, Source, Vector, FResult)): 
    11821184            return add_type(o.__dict__, type(o)) 
     1185        # detector 
     1186        if isinstance(o, (Detector, Process, TransmissionSpectrum, Aperture, Collimation)): 
     1187            return add_type(o.__dict__, type(o)) 
     1188 
    11831189        if isinstance(o, (Plottable, View)): 
    11841190            return add_type(o.__dict__, type(o)) 
     
    12201226        Sample, Source, Vector, 
    12211227        Plottable, Data1D, Data2D, PlottableTheory1D, PlottableFit1D, Text, Chisq, View, 
     1228        Detector, Process, TransmissionSpectrum, Collimation, Aperture, 
    12221229        DataState, np.ndarray, FResult, FitData1D, FitData2D, SasviewModel] 
    12231230 
     
    12521259 
    12531260        # "simple" types 
    1254         if cls in (Sample, Source, Vector, FResult, FitData1D, FitData2D, SasviewModel): 
     1261        if cls in (Sample, Source, Vector, FResult, FitData1D, FitData2D, 
     1262                   SasviewModel, Detector, Process, TransmissionSpectrum, 
     1263                   Collimation, Aperture): 
    12551264            return simple_type(cls, data, level) 
    12561265        if issubclass(cls, Plottable) or (cls == View): 
Note: See TracChangeset for help on using the changeset viewer.