Changeset c26a64b in sasview for sansview/perspectives


Ignore:
Timestamp:
Jan 21, 2011 4:46:51 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:
cfcb7207
Parents:
df7046f
Message:

working loading data in fitting perspectives

Location:
sansview/perspectives/fitting
Files:
1 added
1 edited

Legend:

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

    rc91c29e rc26a64b  
    5050DEFAULT_QMAX = 0.13 
    5151DEFAULT_NPTS = 50 
     52MAX_NBR_DATA = 4 
    5253 
    5354(PageInfoEvent, EVT_PAGE_INFO)   = wx.lib.newevent.NewEvent() 
     
    274275        receive a list of data to fit 
    275276        """ 
    276         for data in data_list: 
     277        selected_data_list = [] 
     278        if len(data_list) > MAX_NBR_DATA : 
     279            from fitting_widgets import DataDialog 
     280            dlg = DataDialog(data_list=data_list, nb_data=MAX_NBR_DATA) 
     281            if dlg.ShowModal() == wx.ID_OK: 
     282                selected_data_list = dlg.get_data() 
     283        else: 
     284            selected_data_list = data_list 
     285        for data in selected_data_list: 
    277286            self.add_fit_page(data=data) 
    278287            wx.PostEvent(self.parent, NewPlotEvent(plot=data,  
    279288                                                   title=str(data.title))) 
    280              
    281289             
    282290    def set_state(self, state=None, datainfo=None, format=None): 
Note: See TracChangeset for help on using the changeset viewer.