Changeset b25caad in sasview for calculatorview/src/sans


Ignore:
Timestamp:
Jan 14, 2012 4:13:47 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
f706e09c
Parents:
6f140f2
Message:

added 'delete custom model menu'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/model_editor.py

    r6f140f2 rb25caad  
    294294        self.param_tcl = EditWindow(self, id, wx.DefaultPosition,  
    295295                            wx.DefaultSize, wx.CLIP_CHILDREN|wx.SUNKEN_BORDER) 
     296        self.param_tcl.setDisplayLineNumbers(True) 
    296297        self.param_tcl.SetToolTipString(param_tip) 
    297298        self.param_sizer.AddMany([(param_txt, 0, wx.LEFT, 10), 
     
    305306        function_txt = wx.StaticText(self, -1, 'Function(x) : ')  
    306307        hint_function = "#Example:\n" 
    307         hint_function += "y = A + B * numpy.sin(x * math.pi)\n" 
    308         hint_function += "return y" 
     308        hint_function += "new_x = x * math.pi\n" 
     309        hint_function += "if new_x <= 0:\n" 
     310        hint_function += "    y = A + B\n" 
     311        hint_function += "else:\n" 
     312        hint_function += "    y = A + B * numpy.cos(new_x)\n" 
     313        hint_function += "return y\n" 
    309314        id  = wx.NewId()  
    310315        self.function_tcl = EditWindow(self, id, wx.DefaultPosition,  
    311316                            wx.DefaultSize, wx.CLIP_CHILDREN|wx.SUNKEN_BORDER) 
     317        self.function_tcl.setDisplayLineNumbers(True) 
    312318        self.function_tcl.SetToolTipString(hint_function) 
    313319        self.function_sizer.Add(function_txt, 0, wx.LEFT, 10) 
     
    567573        On close event 
    568574        """ 
    569         self.parent.new_model_frame = None 
     575        if self.parent != None: 
     576            self.parent.new_model_frame = None 
    570577        self.Destroy()   
    571578 
Note: See TracChangeset for help on using the changeset viewer.