Changeset 26f3dd5 in sasview for sansview


Ignore:
Timestamp:
May 21, 2010 5:13:09 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5cc7001
Parents:
61cada5
Message:

working on save option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/pagestate.py

    r61cada5 r26f3dd5  
    1414CANSAS_NS = "cansas1d/1.0" 
    1515 
    16 list_of_state_attributes = [["is_data", "is_data", "bool"], 
     16list_of_data_attributes = [["is_data", "is_data", "bool"], 
    1717                      ["group_id", "data_group_id", "string"], 
    1818                      ["data_name", "data_name", "string"], 
    1919                      ["data_id", "data_id", "string"], 
    2020                      ["name", "name", "string"], 
    21                       ["data_name", "data_name", "string"], 
    22                       ["qmin", "qmin", "float"], 
     21                      ["data_name", "data_name", "string"]] 
     22list_of_state_attributes = [["qmin", "qmin", "float"], 
    2323                      ["qmax", "qmax", "float"], 
    2424                      ["npts", "npts", "float"], 
     
    2929                      ["formfactorcombobox", "formfactorcombobox", "bool"], 
    3030                      ["structurecombobox", "structurecombobox", "bool"], 
    31                       ["disp_box", "disp_box"]] 
     31                      ["disp_box", "disp_box"], 
     32                      ["enable_smearer","enable_smearer","bool"], 
     33                      ["disable_smearer","disable_smearer","bool"], 
     34                      ["pinhole_smearer","pinhole_smearer","bool"], 
     35                      ["slit_smearer","slit_smearer","bool"], 
     36                      ["enable_disp","enable_disp","bool"], 
     37                      ["disable_disp","disable_disp","bool"], 
     38                      ["slit_smearer","slit_smearer","bool"], 
     39                      ["enable2D","enable2D","bool"], 
     40                      ["cb1","cb1","bool"], 
     41                      ["tcChi","tcChi","float"]] 
    3242list_of_state_parameters = [["parameters", "parameters"] ,                      
    3343                            ["orientation_parameters", "orientation_params"], 
     
    334344            self.data_id = self.data.id 
    335345        
    336         for item in list_of_state_attributes: 
     346        for item in list_of_data_attributes: 
    337347            exec "element.setAttribute(item[0], str(self.%s))"%(item[1]) 
    338348        inputs.appendChild(element)    
    339         
     349         
     350        for item in list_of_state_attributes: 
     351            element = newdoc.createElement(item[0]) 
     352            exec "element.setAttribute(item[0], str(self.%s))"%(item[1]) 
     353            inputs.appendChild(element) 
     354         
    340355        for item in list_of_state_parameters: 
    341356            element = newdoc.createElement(item[0]) 
Note: See TracChangeset for help on using the changeset viewer.