Changeset 1b17a64 in sasview for prview/perspectives/pr


Ignore:
Timestamp:
Jul 19, 2010 4:17:40 PM (14 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:
3c44c66
Parents:
b5a21aa
Message:

working on guiframe loaded many data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prview/perspectives/pr/inversion_panel.py

    r7116b6e0 r1b17a64  
    292292        return state 
    293293     
     294    def set_data(self, list=[], state=None): 
     295        """ 
     296        Receive  a list of data from gui_manager to compute pr 
     297        """ 
     298        if list==[]: 
     299            return 
     300        elif len(list) == 1: 
     301            data, filepath = list[0] 
     302            if data.__class__.__name__ == "Data2D": 
     303                msg = "Pr cannot be computed for Data2D.\n" 
     304                msg += "Please load another file.\n" 
     305                dial = wx.MessageDialog(None, msg, 'Error Loading File',  
     306                                        wx.OK | wx.ICON_EXCLAMATION) 
     307                dial.ShowModal()  
     308            else: 
     309                 self._change_file(evt=None, filepath=filepath) 
     310        else: 
     311            msg = "Pr cannot be computed for more than one data.\n" 
     312            msg += "Please load only file.\n" 
     313            dial = wx.MessageDialog(None, msg, 'Error Loading File',  
     314                                    wx.OK | wx.ICON_EXCLAMATION) 
     315            dial.ShowModal()  
     316             
    294317    def set_state(self, state): 
    295318        """ 
Note: See TracChangeset for help on using the changeset viewer.