Changeset 1debb29 in sasview


Ignore:
Timestamp:
May 12, 2009 11:34:27 AM (16 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:
63c7d85d
Parents:
12dbb14d
Message:

move code of panel slicer from guiframe to fitting plugin

Location:
guiframe/local_perspectives/plotting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/Plotter1D.py

    r3b69ca6 r1debb29  
    2020from sans.guicomm.events import EVT_NEW_PLOT 
    2121from sans.guicomm.events import StatusEvent ,NewPlotEvent,SlicerEvent,ErrorDataEvent 
     22from sans.guicomm.events import RemoveDataEvent 
    2223from sans.guiframe.utils import PanelMenu 
    2324 
     
    162163        """ 
    163164        ## Check if there is a selected graph to remove 
    164         if not self.graph.selected_plottable == None: 
     165        if not self.graph.selected_plottable == None and\ 
     166            self.graph.selected_plottable in self.plots.keys(): 
     167            color=self.graph.plottables[self.plots[self.graph.selected_plottable]] 
     168            
     169            event = RemoveDataEvent(data =self.plots[self.graph.selected_plottable]) 
     170            wx.PostEvent(self.parent, event) 
    165171            self.graph.delete(self.plots[self.graph.selected_plottable]) 
    166172            del self.plots[self.graph.selected_plottable] 
     173            ## increment graph color 
     174            self.graph.color += color 
    167175            self.graph.render(self) 
    168176            self.subplot.figure.canvas.draw_idle()     
     177            
    169178             
    170179 
     
    333342        import time 
    334343         
    335         if not self.graph.selected_plottable == None: 
     344        if not self.graph.selected_plottable == None \ 
     345            and self.graph.selected_plottable in self.plots.keys(): 
    336346            ##Reset the flag to display the hide option on the context menu 
    337347            self.errors_hide = False 
  • guiframe/local_perspectives/plotting/Plotter2D.py

    r70cf5d3 r1debb29  
    464464        ## post slicer panel to guiframe to display it  
    465465        from sans.guicomm.events import SlicerPanelEvent 
    466         wx.PostEvent(self.parent, SlicerPanelEvent (panel= self.panel_slicer)) 
     466        wx.PostEvent(self.parent, SlicerPanelEvent (panel= self.panel_slicer, 
     467                                                    main_panel =self)) 
    467468 
    468469         
Note: See TracChangeset for help on using the changeset viewer.