Changeset 0b6ae5f in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Apr 27, 2011 11:15:20 AM (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:
908b817
Parents:
a0986f6
Message:

change order of fitting menu

File:
1 edited

Legend:

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

    r4bee68d r0b6ae5f  
    9595        self.state_reader = None  
    9696        self._extensions = '.fitv' 
     97        self.scipy_id = wx.NewId() 
     98        self.park_id = wx.NewId() 
     99         
    97100        self.temp_state = [] 
    98101        self.state_index = 0 
     
    115118        #Menu for fitting 
    116119        self.menu1 = wx.Menu() 
    117          
    118         #Set park engine 
    119         id3 = wx.NewId() 
    120         scipy_help= "Scipy Engine: Perform Simple fit. More in Help window...." 
    121         self.menu1.AppendCheckItem(id3, "Simple Fit  [Scipy]",scipy_help)  
    122         wx.EVT_MENU(owner, id3,  self._onset_engine_scipy) 
    123          
    124         id3 = wx.NewId() 
    125         park_help = "Park Engine: Perform Complex fit. More in Help window...." 
    126         self.menu1.AppendCheckItem(id3, "Complex Fit  [Park]",park_help)  
    127         wx.EVT_MENU(owner, id3,  self._onset_engine_park) 
    128          
    129         self.menu1.FindItemByPosition(0).Check(True) 
    130         self.menu1.FindItemByPosition(1).Check(False) 
    131              
     120        id1 = wx.NewId() 
     121        simul_help = "Add new fit panel" 
     122        self.menu1.Append(id1, '&New Fit Page',simul_help) 
     123        wx.EVT_MENU(owner, id1, self.on_add_new_page) 
    132124        self.menu1.AppendSeparator() 
    133125        id1 = wx.NewId() 
     
    135127        self.menu1.Append(id1, '&Simultaneous Fit',simul_help) 
    136128        wx.EVT_MENU(owner, id1, self.on_add_sim_page) 
    137          
    138129        self.menu1.AppendSeparator() 
    139          
    140         id1 = wx.NewId() 
    141         simul_help = "Add new fit panel" 
    142         self.menu1.Append(id1, '&New Fit Page',simul_help) 
    143         wx.EVT_MENU(owner, id1, self.on_add_new_page) 
    144      
     130        #Set park engine 
     131         
     132        scipy_help= "Scipy Engine: Perform Simple fit. More in Help window...." 
     133        self.menu1.AppendCheckItem(self.scipy_id, "Simple Fit  [Scipy]",scipy_help)  
     134        wx.EVT_MENU(owner, self.scipy_id,  self._onset_engine_scipy) 
     135         
     136        park_help = "Park Engine: Perform Complex fit. More in Help window...." 
     137        self.menu1.AppendCheckItem(self.park_id, "Complex Fit  [Park]",park_help)  
     138        wx.EVT_MENU(owner, self.park_id,  self._onset_engine_park) 
     139         
     140        self.menu1.FindItemById(self.scipy_id).Check(True) 
     141        self.menu1.FindItemById(self.park_id).Check(False) 
    145142        #create  menubar items 
    146143        return [(self.menu1, "FitEngine")] 
     
    10691066        ## change menu item state 
    10701067        if engine=="park": 
    1071             self.menu1.FindItemByPosition(0).Check(False) 
    1072             self.menu1.FindItemByPosition(1).Check(True) 
     1068            self.menu1.FindItemById(self.park_id).Check(True) 
     1069            self.menu1.FindItemById(self.scipy_id).Check(False) 
    10731070        else: 
    1074             self.menu1.FindItemByPosition(0).Check(True) 
    1075             self.menu1.FindItemByPosition(1).Check(False) 
     1071            self.menu1.FindItemById(self.park_id).Check(False) 
     1072            self.menu1.FindItemById(self.scipy_id).Check(True) 
    10761073        ## post a message to status bar 
    10771074        msg = "Engine set to: %s" % self._fit_engine 
Note: See TracChangeset for help on using the changeset viewer.