Changeset ec1584e in sasview


Ignore:
Timestamp:
Mar 25, 2011 12:13:57 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:
c3f697e
Parents:
84e5533
Message:

edit context menu of invariant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant.py

    r2f97794 rec1584e  
    118118        data = plotpanel.plots[graph.selected_plottable] 
    119119         
    120         if not issubclass(data.__class__, Data1D): 
    121             name = data.__class__.__name__ 
    122             msg = "Invariant use only Data1D got: [%s] " % str(name) 
    123             raise ValueError, msg  
    124          
    125         if data.name != "$I_{obs}(q)$" and  data.name != " $P_{fit}(r)$": 
    126            return [[invariant_option, invariant_hint,  
     120        if issubclass(data.__class__, Data1D): 
     121           if data.name != "$I_{obs}(q)$" and  data.name != " $P_{fit}(r)$": 
     122               return [[invariant_option, invariant_hint,  
    127123                                        self._compute_invariant]] 
    128124        return [] 
Note: See TracChangeset for help on using the changeset viewer.