Ignore:
Timestamp:
Sep 23, 2011 9:44:39 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
d03a356
Parents:
22ce7e2
Message:

fixed group_id related problem when set data in fitpage and added feature that send multiple data sets on import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    r6721b75 r5e48acb  
    18041804        reset the current data  
    18051805        """ 
     1806        from sans.guiframe.dataFitting import check_data_validity 
    18061807        id = None 
    1807         group_id = None 
    18081808        flag = False 
     1809        is_data = False 
    18091810        if self.data is not None: 
    1810             group_id = self.data.group_id 
    1811             
    1812         if self.data is None and data is not None: 
     1811            is_data = check_data_validity(self.data)   
     1812        if not is_data and data is not None: 
    18131813                flag = True 
    18141814        if data is not None: 
    18151815            id = data.id 
    1816             if self.data is not None: 
     1816            if is_data: 
     1817                self.graph_id = self.data.group_id 
    18171818                flag = (data.id != self.data.id) 
    18181819        self.data = data 
    1819         self.data.group_id = group_id 
     1820        if check_data_validity(data): 
     1821            self.graph_id = data.group_id 
     1822        self.data.group_id = self.graph_id 
     1823         
    18201824        if self.data is None: 
    18211825            data_min = "" 
     
    19051909        self.state.qmax = self.qmax_x 
    19061910        self.enable_fit_button() 
     1911        # send graph_id to page_finder  
     1912        self._manager.set_graph_id(uid=self.uid, graph_id=self.graph_id) 
    19071913        #update model plot with new data information 
    19081914        if flag: 
     
    19181924            #by removing the previous selected data 
    19191925            wx.PostEvent(self._manager.parent, NewPlotEvent(action="remove", 
    1920                                                     group_id=group_id, id=id)) 
     1926                                                    group_id=self.graph_id, id=id)) 
    19211927            #plot the current selected data 
    19221928            wx.PostEvent(self._manager.parent, NewPlotEvent(plot=self.data,  
Note: See TracChangeset for help on using the changeset viewer.