Changeset 39551a68 in sasview for src/sas/qtgui/GuiUtils.py


Ignore:
Timestamp:
Aug 1, 2016 9:47:16 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
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
Children:
1af348e
Parents:
28a84e9
Message:

More context menu functionality + tests

File:
1 edited

Legend:

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

    r28a84e9 r39551a68  
    388388def retrieveData2d(data): 
    389389    """ 
    390     Retrieve 1D data from file and construct its text 
     390    Retrieve 2D data from file and construct its text 
    391391    representation 
    392392    """ 
     393    if not isinstance(data, Data2D): 
     394        msg = "Incorrect type passed to retrieveData2d" 
     395        raise AttributeError, msg 
     396 
    393397    text = data.__str__() 
    394398    text += 'Data Min Max:\n' 
     
    428432    return text 
    429433 
    430 def _onTXTSave(data, path): 
     434def onTXTSave(data, path): 
    431435    """ 
    432436    Save file as formatted txt 
     
    499503    loader = Loader() 
    500504    if os.path.splitext(filename)[1].lower() == ".txt": 
    501         _onTXTSave(data, filename) 
     505        onTXTSave(data, filename) 
    502506    if os.path.splitext(filename)[1].lower() == ".xml": 
    503507        loader.save(filename, data, ".xml") 
Note: See TracChangeset for help on using the changeset viewer.