Skip to content

Commit e3ff5f4

Browse files
committed
remove Draw Atoms menu commands that are not implemented or are in wrong menu, update names for consistency
1 parent 055adb3 commit e3ff5f4

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

GSASII/GSASIIdataGUI.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7469,7 +7469,7 @@ def _makemenu(): # routine to create menu when first used
74697469

74707470
# Phase / Atoms tab
74717471
G2G.Define_wxId('wxID_ATOMSEDITADD', 'wxID_ATOMSEDITINSERT', 'wxID_ATOMSEDITDELETE',
7472-
'wxID_ATOMSMODIFY', 'wxID_ATOMSTRANSFORM', 'wxID_ATOMSVIEWADD', 'wxID_ATOMVIEWINSERT',
7472+
'wxID_ATOMSMODIFY', 'wxID_ATOMSTRANSFORM', 'wxID_ATOMSVIEWADD', #'wxID_ATOMVIEWINSERT',
74737473
'wxID_RELOADDRAWATOMS', 'wxID_ATOMSDISAGL', 'wxID_ATOMMOVE', 'wxID_MAKEMOLECULE',
74747474
'wxID_ATOMSPDISAGL', 'wxID_ISODISP', 'wxID_ADDHATOM', 'wxID_UPDATEHATOM','wxID_ATOMSCLEARHIST',
74757475
'wxID_ATOMSROTATE', 'wxID_ATOMSDENSITY','wxID_ATOMSBNDANGLHIST','wxID_ATOMSSAVEHIST',
@@ -7486,18 +7486,18 @@ def _makemenu(): # routine to create menu when first used
74867486
self.AtomEdit.AppendSubMenu(submenu,'On selected atoms...','Set/Act on selected atoms')
74877487
submenu.Append(G2G.wxID_ATOMSSETSEL,'Refine selected','Set refinement flags for selected atoms')
74887488
submenu.Append(G2G.wxID_ATOMSMODIFY,'Modify parameters','Modify parameters values for all selected atoms')
7489-
submenu.Append(G2G.wxID_ATOMSSETVP,'Set viewpoint','Set the viewpoint to be position of 1st selected atom')
7490-
submenu.Append(G2G.wxID_ATOMMOVE,'Move atom to view point','Move a single atom to viewpoint in plot')
7489+
submenu.Append(G2G.wxID_ATOMSSETVP,'Set view point','Set the view point to be position of 1st selected atom')
7490+
submenu.Append(G2G.wxID_ATOMMOVE,'Move atom to view point','Move a single atom to view point in plot')
74917491
submenu.Append(G2G.wxID_ATOMSEDITINSERT,'Insert atom','Inserts an H atom before all selected atoms')
7492-
submenu.Append(G2G.wxID_ATOMVIEWINSERT,'Insert viewpoint','Select atom row to insert before; inserted as an H atom')
7492+
#submenu.Append(G2G.wxID_ATOMVIEWINSERT,'Insert view point','Select atom row to insert before; inserted as an H atom')
74937493
submenu.Append(G2G.wxID_ADDHATOM,'Calc H atoms','Insert H atoms in expected bonding positions for selected atoms')
74947494
submenu.Append(G2G.wxID_ATOMSEDITDELETE,'Delete atom','Delete selected atoms')
74957495
submenu.Append(G2G.wxID_ATOMSTRANSFORM,'Transform atoms','Symmetry transform selected atoms')
74967496
submenu.Append(G2G.wxID_ATOMSSETALL,'Select All','Select all atoms')
74977497
submenu.Append(G2G.wxID_ATOMSSETLST,'Select from list','Select atoms from a filtered listbox')
74987498

74997499
self.AtomEdit.Append(G2G.wxID_ATOMSEDITADD,'Append atom','Appended as an H atom')
7500-
self.AtomEdit.Append(G2G.wxID_ATOMSVIEWADD,'Append view point','Appended as an H atom')
7500+
self.AtomEdit.Append(G2G.wxID_ATOMSVIEWADD,'Append atom at view point','Appended as an H atom')
75017501
self.AtomEdit.Append(G2G.wxID_UPDATEHATOM,'Update H atoms','Update H atoms in standard positions')
75027502
self.AtomEdit.Append(G2G.wxID_MAKEMOLECULE,'Assemble molecule','Select a single atom to assemble as a molecule from scattered atom positions')
75037503
self.AtomEdit.Append(G2G.wxID_COLLECTATOMS,'Collect atoms','Collect selected atoms to specified unit cell location')
@@ -7629,11 +7629,11 @@ def _makemenu(): # routine to create menu when first used
76297629
self.DrawAtomEdit.Append(G2G.wxID_DRAWATOMCOLOR,'Atom color','Select atoms first')
76307630
self.DrawAtomEdit.Append(G2G.wxID_DRAWATOMRESETCOLOR,'Reset atom colors','Resets all atom colors to defaults')
76317631
self.DrawAtomEdit.Append(G2G.wxID_DRWAEDITRADII,'Edit atom radii','Edit drawing atom radii')
7632-
self.DrawAtomEdit.Append(G2G.wxID_DRAWVIEWPOINT,'View point','View point is 1st atom selected')
7632+
self.DrawAtomEdit.Append(G2G.wxID_DRAWVIEWPOINT,'Set view point','View point is 1st atom selected')
76337633
self.DrawAtomEdit.Append(G2G.wxID_DRAWSETSEL,'Select from list','Select atoms from a filtered listbox')
76347634
self.DrawAtomEdit.Append(G2G.wxID_DRAWADDEQUIV,'Add atoms','Add symmetry & cell equivalents to drawing set from selected atoms')
76357635
self.DrawAtomEdit.Append(G2G.wxID_DRAWADDSPHERE,'Add sphere of atoms','Add atoms within sphere of enclosure')
7636-
self.DrawAtomEdit.Append(G2G.wxID_DRAWADDBOX,'Add box of atoms','Add atoms within box of enclosure')
7636+
# self.DrawAtomEdit.Append(G2G.wxID_DRAWADDBOX,'Add box of atoms','Add atoms within box of enclosure')
76377637
self.DrawAtomEdit.Append(G2G.wxID_DRAWTRANSFORM,'Transform draw atoms','Transform selected atoms by symmetry & cell translations')
76387638
self.DrawAtomEdit.Append(G2G.wxID_DRAWFILLCOORD,'Fill CN-sphere','Fill coordination sphere for selected atoms')
76397639
self.DrawAtomEdit.Append(G2G.wxID_DRAWFILLCELL,'Fill unit cell','Fill unit cell with selected atoms')

GSASII/GSASIImapvars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ def Map2Dict(parmDict,varyList):
19191919
19201920
:param dict parmDict: a dict containing parameter values keyed by the
19211921
parameter names. For new variables created by constraints, entries
1922-
will be added to the dictionary, if not alreay present, or the
1922+
will be added to the dictionary, if not already present, or the
19231923
values will be recomputed.
19241924
19251925
:param list varyList: a list of parameters names. Will be modified.

GSASII/GSASIIphsGUI.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4957,14 +4957,14 @@ def Paint(Scroll=0):
49574957
rbAtmDict.update(dict(zip(rbObj['Ids'],exclList)))
49584958
Items = [G2G.wxID_ATOMSEDITINSERT,G2G.wxID_ATOMSEDITDELETE,
49594959
G2G.wxID_ATOMSMODIFY,G2G.wxID_ATOMSTRANSFORM,G2G.wxID_MAKEMOLECULE,
4960-
G2G.wxID_ATOMVIEWINSERT,G2G.wxID_ATOMMOVE,G2G.wxID_ADDHATOM]
4960+
G2G.wxID_ATOMMOVE,G2G.wxID_ADDHATOM] # G2G.wxID_ATOMVIEWINSERT,
49614961
if atomData:
49624962
for item in Items:
49634963
G2frame.dataWindow.AtomsMenu.Enable(item,True)
49644964
else:
49654965
for item in Items:
49664966
G2frame.dataWindow.AtomsMenu.Enable(item,False)
4967-
Items = [G2G.wxID_ATOMVIEWINSERT, G2G.wxID_ATOMSVIEWADD,G2G.wxID_ATOMMOVE]
4967+
Items = [G2G.wxID_ATOMSVIEWADD,G2G.wxID_ATOMMOVE] # G2G.wxID_ATOMVIEWINSERT,
49684968
if 'showABC' in data['Drawing']:
49694969
for item in Items:
49704970
G2frame.dataWindow.AtomsMenu.Enable(item,True)
@@ -13028,7 +13028,7 @@ def OnPeaksViewPoint(event):
1302813028
# set view point
1302913029
indx = getAtomSelections(G2frame.MapPeaks)
1303013030
if not indx:
13031-
G2frame.ErrorDialog('Set viewpoint','No peaks selected')
13031+
G2frame.ErrorDialog('Set view point','No peaks selected')
1303213032
return
1303313033
mapPeaks = data['Map Peaks']
1303413034
drawingData = data['Drawing']
@@ -13472,7 +13472,7 @@ def FillMenus():
1347213472

1347313473
G2frame.Bind(wx.EVT_MENU, OnAtomAdd, id=G2G.wxID_ATOMSEDITADD)
1347413474
G2frame.Bind(wx.EVT_MENU, OnAtomViewAdd, id=G2G.wxID_ATOMSVIEWADD)
13475-
G2frame.Bind(wx.EVT_MENU, OnAtomViewInsert, id=G2G.wxID_ATOMVIEWINSERT)
13475+
#G2frame.Bind(wx.EVT_MENU, OnAtomViewInsert, id=G2G.wxID_ATOMVIEWINSERT)
1347613476
G2frame.Bind(wx.EVT_MENU, OnHydAtomUpdate, id=G2G.wxID_UPDATEHATOM)
1347713477
G2frame.Bind(wx.EVT_MENU, OnAtomMove, id=G2G.wxID_ATOMMOVE)
1347813478
G2frame.Bind(wx.EVT_MENU, MakeMolecule, id=G2G.wxID_MAKEMOLECULE)
@@ -13521,7 +13521,7 @@ def FillMenus():
1352113521
G2frame.Bind(wx.EVT_MENU, SetViewPoint, id=G2G.wxID_DRAWVIEWPOINT)
1352213522
G2frame.Bind(wx.EVT_MENU, AddSymEquiv, id=G2G.wxID_DRAWADDEQUIV)
1352313523
G2frame.Bind(wx.EVT_MENU, AddSphere, id=G2G.wxID_DRAWADDSPHERE)
13524-
G2frame.Bind(wx.EVT_MENU, AddBox, id=G2G.wxID_DRAWADDBOX)
13524+
#G2frame.Bind(wx.EVT_MENU, AddBox, id=G2G.wxID_DRAWADDBOX)
1352513525
G2frame.Bind(wx.EVT_MENU, TransformSymEquiv, id=G2G.wxID_DRAWTRANSFORM)
1352613526
G2frame.Bind(wx.EVT_MENU, FillCoordSphere, id=G2G.wxID_DRAWFILLCOORD)
1352713527
G2frame.Bind(wx.EVT_MENU, FillUnitCell, id=G2G.wxID_DRAWFILLCELL)

0 commit comments

Comments
 (0)