Ignore:
Timestamp:
Feb 9, 2009 9:11:37 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:
d06ba5e
Parents:
97f0c39b
Message:

check the existance of id before using its value on 1d event plot

Location:
guiframe/local_perspectives/plotting
Files:
2 edited

Legend:

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

    rd468daa re48a62e  
    109109            # a new plottable overwrites a plotted one  using the same id 
    110110            for plottable in self.plots.itervalues(): 
    111                 if event.plot.id==plottable.id : 
    112                     self.graph.delete(plottable) 
     111                if hasattr(event.plot,"id"): 
     112                    if event.plot.id==plottable.id : 
     113                        self.graph.delete(plottable) 
    113114             
    114115            self.plots[event.plot.name] = event.plot 
  • guiframe/local_perspectives/plotting/Plotter2D.py

    r216efab re48a62e  
    141141            # a new plottable overwrites a plotted one  using the same id 
    142142            for plottable in self.plots.itervalues(): 
    143                 if event.plot.id==plottable.id : 
    144                     self.graph.delete(plottable) 
     143                if hasattr(event.plot,"id"): 
     144                    if event.plot.id==plottable.id : 
     145                        self.graph.delete(plottable) 
    145146             
    146147            self.plots[event.plot.name] = event.plot 
Note: See TracChangeset for help on using the changeset viewer.