Changeset 04a884a in sasview for src/sas


Ignore:
Timestamp:
Jan 7, 2019 7:23:56 AM (5 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:
10786bc2, 44a698c
Parents:
59b925c1
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (01/07/19 07:22:49)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (01/07/19 07:23:56)
Message:

Minor fixes for SVS loader/converter logic. SASVIEW-1237

Location:
src/sas/qtgui
Files:
2 edited

Legend:

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

    ra944beb r04a884a  
    488488            params = value['fit_params'] 
    489489            for page in params: 
     490                if not isinstance(page, dict): 
     491                    continue 
     492                if 'is_batch_fitting' not in page: 
     493                    continue 
    490494                if page['is_batch_fitting'][0] != 'True': 
    491495                    continue 
     
    551555            if isinstance(new_data, (old_data1d, old_data2d)): 
    552556                new_data = self.manager.create_gui_data(value[0], new_data.filename) 
     557            if hasattr(value[0], 'id'): 
     558                new_data.id = value[0].id 
     559                new_data.group_id = value[0].group_id 
    553560            assert isinstance(new_data, (Data1D, Data2D)) 
    554561            # make sure the ID is retained 
    555             new_data.id = value[0].id 
    556             new_data.group_id = value[0].group_id 
    557562            properties = value[1] 
    558563            is_checked = properties['checked'] 
     
    561566            items.append(new_item) 
    562567            model = self.theory_model 
    563             if value[0].is_data: 
     568            if new_data.is_data: 
    564569                model = self.model 
    565570                # Caption for the theories 
  • src/sas/qtgui/Utilities/GuiUtils.py

    r99f8760 r04a884a  
    13881388        for p in params.parameters: 
    13891389            p_name = p[1] 
    1390             param_dict[p_name] = [str(p[0]), str(p[2]), None, str(p[5][1]), str(p[6][1])] 
     1390            param_dict[p_name] = [str(p[0]), str(p[2]), None, str(p[5][1]), str(p[6][1]), []] 
    13911391        # orientation parameters 
    13921392        if params.is_2D: 
     
    13991399                if p[6][1] != "": 
    14001400                    p_max = p[6][1] 
    1401                 param_dict[p_name] = [str(p[0]), str(p[2]), None, p_min, p_max] 
     1401                param_dict[p_name] = [str(p[0]), str(p[2]), None, p_min, p_max, []] 
    14021402 
    14031403        # disperse parameters 
     
    14261426                param_dict[p_name] = [p_opt, p_width, p_min, p_max, p_npts, p_nsigmas, p_disp] 
    14271427 
     1428        param_dict['is_batch_fitting'] = ['False'] 
    14281429        content[params.data_id]['fit_params'] = param_dict 
     1430 
    14291431    return content 
    14301432 
Note: See TracChangeset for help on using the changeset viewer.