Changeset 94f0873f in sasview for src/sas/sasgui/perspectives/calculator/model_editor.py
- Timestamp:
- Nov 8, 2016 5:19:52 AM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/calculator/model_editor.py
rcf1910f r94f0873f 632 632 self.reader = None 633 633 self.name = 'untitled' 634 self.overwrite_name = True634 self.overwrite_name = False 635 635 self.is_2d = False 636 636 self.fname = None … … 684 684 name_txt = wx.StaticText(self, -1, 'Function Name : ') 685 685 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) 687 687 overwrite_cb.SetToolTipString("Overwrite it if already exists?") 688 688 wx.EVT_CHECKBOX(self, overwrite_cb.GetId(), self.on_over_cb) 689 #overwrite_cb.Show(False)690 689 self.name_tcl = wx.TextCtrl(self, -1, size=(PANEL_WIDTH * 3 / 5, -1)) 691 690 self.name_tcl.Bind(wx.EVT_TEXT_ENTER, self.on_change_name) 692 self.name_tcl.SetValue(' MyFunction')691 self.name_tcl.SetValue('') 693 692 self.name_tcl.SetFont(self.font) 694 693 hint_name = "Unique Model Function Name." … … 947 946 # First check for valid python name then if the name already exists 948 947 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" 950 950 msg += "may include only alpha numeric or underline characters \n" 951 951 msg += "and no spaces"
Note: See TracChangeset
for help on using the changeset viewer.