Ignore:
Timestamp:
Oct 12, 2011 4:04:01 PM (13 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:
26fc866
Parents:
da6fd1a
Message:

make sure residuals ans data are plotted using the same graph for each batch page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/data_processor.py

    r4c712ea4 rfd51a7c  
    9191        self.AdjustScrollbars() 
    9292        #self.SetLabelBackgroundColour('#DBD4D4') 
     93        self.uid = wx.NewId() 
    9394        self.parent = parent 
    9495        self.panel = panel 
     
    614615        self.plot_button = None 
    615616        self.notebook = None 
     617        self.list_plot_panels = {} 
    616618        self.layout_grid() 
    617619        self.layout_plotting_area() 
     
    678680        grid = self.notebook.GetPage(pos) 
    679681        title = self.notebook.GetPageText(pos) 
    680          
    681          
    682         group_id = wx.NewId() 
     682     
    683683        for cell in grid.selected_cells: 
    684684            row, col = cell 
     
    697697                                 StatusEvent(status=msg, info="error"))  
    698698                            return 
     699                         
    699700                        if issubclass(new_plot.__class__, Data1D): 
    700                             new_plot.group_id = group_id 
    701                             new_plot.list_group_id .append(group_id) 
     701                            if label in self.list_plot_panels.keys(): 
     702                                group_id = self.list_plot_panels[label] 
     703                            else: 
     704                                group_id = str(grid.uid) + str(new_plot.group_id) 
     705                                self.list_plot_panels[label] = group_id 
     706                            if group_id not in new_plot.list_group_id: 
     707                                new_plot.group_id = group_id 
     708                                new_plot.list_group_id.append(group_id) 
    702709                        else: 
    703710                            if label.lower() in ["data", "chi2"]: 
     
    710717                                    return   
    711718                        wx.PostEvent(self.parent.parent,  
     719                                     NewPlotEvent(action="clear", 
     720                                                  group_id=str(group_id), 
     721                                                  title=title))   
     722                        wx.PostEvent(self.parent.parent,  
    712723                                     NewPlotEvent(plot=new_plot,  
    713                                   group_id=str(new_plot.group_id), 
    714                                    title =title))   
     724                                                  group_id=str(group_id), 
     725                                                  title=title))   
    715726                else: 
    716727                    
Note: See TracChangeset for help on using the changeset viewer.