Changeset 94f0873f in sasview for src


Ignore:
Timestamp:
Nov 8, 2016 5:19:52 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8fa53f7, a08b89b
Parents:
b0e0183
Message:

Removed default name and changed override status. Fixes #770

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/model_editor.py

    rcf1910f r94f0873f  
    632632        self.reader = None 
    633633        self.name = 'untitled' 
    634         self.overwrite_name = True 
     634        self.overwrite_name = False 
    635635        self.is_2d = False 
    636636        self.fname = None 
     
    684684        name_txt = wx.StaticText(self, -1, 'Function Name : ') 
    685685        overwrite_cb = wx.CheckBox(self, -1, "Overwrite existing plugin model of this name?", (10, 10)) 
    686         overwrite_cb.SetValue(True) 
     686        overwrite_cb.SetValue(False) 
    687687        overwrite_cb.SetToolTipString("Overwrite it if already exists?") 
    688688        wx.EVT_CHECKBOX(self, overwrite_cb.GetId(), self.on_over_cb) 
    689         #overwrite_cb.Show(False) 
    690689        self.name_tcl = wx.TextCtrl(self, -1, size=(PANEL_WIDTH * 3 / 5, -1)) 
    691690        self.name_tcl.Bind(wx.EVT_TEXT_ENTER, self.on_change_name) 
    692         self.name_tcl.SetValue('MyFunction') 
     691        self.name_tcl.SetValue('') 
    693692        self.name_tcl.SetFont(self.font) 
    694693        hint_name = "Unique Model Function Name." 
     
    947946        # First check for valid python name then if the name already exists 
    948947        if not name or not bool(re.match('^[A-Za-z0-9_]*$', name)): 
    949             msg = "is not a valid python name. Name must not be empty and \n" 
     948            msg = '"%s" '%name 
     949            msg += "is not a valid model name. Name must not be empty and \n" 
    950950            msg += "may include only alpha numeric or underline characters \n" 
    951951            msg += "and no spaces" 
Note: See TracChangeset for help on using the changeset viewer.