Changeset 155c088 in sasview for sansview


Ignore:
Timestamp:
Nov 4, 2009 12:59:49 PM (15 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:
cf76ca74
Parents:
27972c1d
Message:

cleaninng the method get_context_menu of fitting .py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitting.py

    rb37f72f r155c088  
    186186            @return: a list of menu items with call-back function 
    187187        """ 
    188         #TODO: clean this up so that the string are not copied  
    189         #      multiple times. 
    190         self.graph=graph 
    191         
     188        self.graph = graph 
     189        fitOption = "Select data for fitting" 
     190        fitOpenHint =  "Dialog with fitting parameters " 
     191         
    192192        for item in graph.plottables: 
    193193            if item.__class__.__name__ is "Data2D": 
     
    195195                if hasattr(item,"is_data"): 
    196196                    if item.is_data: 
    197                         return [["Select data for fitting", \ 
    198                          "Dialog with fitting parameters ", self._onSelect]] 
     197                        return [[fitOption, fitOpenHint, self._onSelect]] 
    199198                    else: 
    200199                        return []  
    201                 return [["Select data for fitting",\ 
    202                           "Dialog with fitting parameters ", self._onSelect]]  
     200                return [[fitOption, fitOpenHint, self._onSelect]] 
    203201            else: 
    204202                if item.name==graph.selected_plottable : 
     
    207205                            if hasattr(item,"is_data"): 
    208206                                if item.is_data: 
    209                                     return [["Select data for fitting", \ 
    210                                      "Dialog with fitting parameters ", self._onSelect]] 
     207                                    return [[fitOption, fitOpenHint, self._onSelect]] 
    211208                                else: 
    212209                                    return []  
    213210                            else: 
    214                                 return [["Select data for fitting", \ 
    215                                      "Dialog with fitting parameters ", self._onSelect]]  
     211                               return [[fitOption, fitOpenHint, self._onSelect]]  
    216212        return []    
    217213 
Note: See TracChangeset for help on using the changeset viewer.