Changeset fe98127 in sasview


Ignore:
Timestamp:
Oct 13, 2011 11:09:27 AM (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:
b18cf3d
Parents:
5d0a786
Message:

check if the view object is a plottable

File:
1 edited

Legend:

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

    rfd51a7c rfe98127  
    1818from sans.guiframe.events import NewPlotEvent  
    1919from sans.guiframe.events import StatusEvent   
     20from danse.common.plottools import plottables 
    2021from sans.guiframe.dataFitting import Data1D 
    2122 
     
    689690                value = values[row -1] 
    690691                if issubclass(value.__class__, BatchCell): 
     692                    if value.object is None or len(value.object) == 0: 
     693                        msg = "Row %s , " % str(row) 
     694                        msg += "Column %s doesn't have a view" % str(label) 
     695                        #raise ValueError, msg 
     696                        wx.PostEvent(self.parent.parent, StatusEvent(status=msg,  
     697                                                                info="error"))  
     698                        return 
    691699                    for new_plot in value.object: 
    692                         if new_plot is None: 
     700                        if new_plot is None or \ 
     701                         not issubclass(value.object.__class__,  
     702                                        plottables.Plottable): 
    693703                            msg = "Row %s , " % str(row) 
    694704                            msg += "Column %s doesn't have a view" % str(label) 
Note: See TracChangeset for help on using the changeset viewer.