Ignore:
Timestamp:
May 24, 2010 5:50:10 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:
bb70474
Parents:
232c3db
Message:

working on save fit page state

File:
1 edited

Legend:

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

    r232c3db r31b0c47  
    617617        return new_data 
    618618            
     619    def store_page(self, page, data): 
     620        """ 
     621            Helper to save page reference into the plug-in 
     622            @param page: page to store 
     623        """ 
     624        page.set_data(data)  
     625        #create a fitproblem storing all link to data,model,page creation 
     626        if not page in self.page_finder.keys(): 
     627            self.page_finder[page] = FitProblem() 
     628        self.page_finder[page].add_fit_data(data) 
     629         
    619630    def add_fit_page(self, data): 
    620631        """ 
     
    626637            # add data associated to the page created 
    627638            if page != None:   
    628                 page.set_data(data)  
    629                 #create a fitproblem storing all link to data,model,page creation 
    630                 if not page in self.page_finder.keys(): 
    631                     self.page_finder[page]= FitProblem() 
    632                 ## item is almost the same as data but contains 
    633                 ## axis info for plotting  
    634                 #self.page_finder[page].add_plotted_data(item) 
    635                 self.page_finder[page].add_fit_data(data) 
    636  
     639                self.store_page(page=page, data=data) 
    637640                wx.PostEvent(self.parent, StatusEvent(status="Page Created", 
    638                                                                 info="info")) 
     641                                               info="info")) 
    639642            else: 
    640643                msg = "Page was already Created" 
     
    643646            msg = "Creating Fit page: %s"%sys.exc_value 
    644647            wx.PostEvent(self.parent, StatusEvent(status=msg, info="error")) 
    645             return 
    646  
    647          
     648        
    648649    def _onEVT_SLICER_PANEL(self, event): 
    649650        """ 
Note: See TracChangeset for help on using the changeset viewer.