Changeset 3468
- Timestamp:
- Jul 12, 2018 10:30:56 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIconstrGUI.py
r3467 r3468 510 510 dlg.Destroy() 511 511 return [] 512 512 513 def FindAllCons(data): 514 ''' Find all constraints 515 ''' 516 allcons = [] 517 for key in data: 518 if key.startswith('_'): continue 519 allcons += data[key] 520 return allcons 521 513 522 def CheckConstraints(constraintSet): 514 523 '''Check for errors in a set of constraints. Constraints based on symmetry (etc.) … … 535 544 :returns: True if constraint should be added 536 545 ''' 537 allcons1 = [] 538 for key in data: 539 if key.startswith('_'): continue 540 allcons1 += data[key] 546 547 allcons1 = FindAllCons(data) 541 548 allcons = allcons1[:] 542 549 allcons += newcons … … 566 573 :returns: True if the edit should be retained 567 574 ''' 568 allcons = [] 569 for key in data: 570 if key.startswith('_'): continue 571 allcons += data[key] 575 allcons = FindAllCons(data) 572 576 if not len(allcons): return True 573 577 errmsg,warnmsg = CheckConstraints(allcons) … … 1002 1006 Id,name = Indx[Obj.GetId()] 1003 1007 del data[name][Id] 1004 allcons = [] 1005 for key in data: 1006 if key.startswith('_'): continue 1007 allcons += data[key] 1008 allcons = FindAllCons(data) 1008 1009 if not len(allcons): return 1009 1010 errmsg,warnmsg = CheckConstraints(allcons) … … 1180 1181 G2frame.constr.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged) 1181 1182 # validate all the constrants -- should not see any errors here normally 1182 allcons = [] 1183 for key in data: 1184 if key.startswith('_'): continue 1185 allcons += data[key] 1183 allcons = FindAllCons(data) 1186 1184 if not len(allcons): return 1187 1185 errmsg,warnmsg = CheckConstraints(allcons)
Note: See TracChangeset
for help on using the changeset viewer.