@@ -6031,7 +6031,7 @@ def UpdateRMC(event=None):
60316031 global runFile
60326032 def OnRMCselect(event):
60336033 G2frame.RMCchoice = RMCsel.GetStringSelection()
6034- wx.CallLater(100 ,UpdateRMC)
6034+ wx.CallLater(200 ,UpdateRMC)
60356035
60366036 def GetAtmChoice(pnl,RMCPdict):
60376037
@@ -10388,40 +10388,42 @@ def SetChoice(name,c,n=0):
1038810388 elif r < 0: #dclick on col label
1038910389 sel = -1
1039010390 if drawAtoms.GetColLabelValue(c) == 'Style':
10391- dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom drawing style',styleChoice)
10392- if dlg.ShowModal() == wx.ID_OK:
10393- sel = dlg.GetSelection()
10394- parms = styleChoice[sel]
10395- for r in range(len(atomData)):
10396- atomData[r][c] = parms
10397- drawAtoms.SetCellValue(r,c,parms)
10398- FindBondsDraw(data)
10399- # G2plt.PlotStructure(G2frame,data)
10400- dlg.Destroy()
10391+ DrawAtomStyle(event)
10392+ # dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom drawing style',styleChoice)
10393+ # if dlg.ShowModal() == wx.ID_OK:
10394+ # sel = dlg.GetSelection()
10395+ # parms = styleChoice[sel]
10396+ # for r in range(len(atomData)):
10397+ # atomData[r][c] = parms
10398+ # drawAtoms.SetCellValue(r,c,parms)
10399+ # FindBondsDraw(data)
10400+ # # G2plt.PlotStructure(G2frame,data)
10401+ # dlg.Destroy()
1040110402 elif drawAtoms.GetColLabelValue(c) == 'Label':
10402- dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom labelling style',labelChoice)
10403- if dlg.ShowModal() == wx.ID_OK:
10404- sel = dlg.GetSelection()
10405- parms = labelChoice[sel]
10406- for r in range(len(atomData)):
10407- atomData[r][c] = parms
10408- drawAtoms.SetCellValue(r,c,parms)
10409- dlg.Destroy()
10403+ DrawAtomLabel(event)
10404+ # dlg = wx.SingleChoiceDialog(G2frame,'Select','Atom labelling style',labelChoice)
10405+ # if dlg.ShowModal() == wx.ID_OK:
10406+ # sel = dlg.GetSelection()
10407+ # parms = labelChoice[sel]
10408+ # for r in range(len(atomData)):
10409+ # atomData[r][c] = parms
10410+ # drawAtoms.SetCellValue(r,c,parms)
10411+ # dlg.Destroy()
1041010412 elif drawAtoms.GetColLabelValue(c) == 'Color':
10411- colors = wx.ColourData( )
10412- colors.SetChooseFull(True )
10413- dlg = wx.ColourDialog(G2frame.GetParent(),colors )
10414- if dlg.ShowModal() == wx.ID_OK:
10415- color = dlg.GetColourData().GetColour()[:3]
10416- attr = wg.GridCellAttr() #needs to be here - gets lost if outside loop!
10417- attr.SetReadOnly(True )
10418- attr.SetBackgroundColour(color)
10419- for r in range(len(atomData)):
10420- atomData[r][c] = color
10421- drawingData['Atoms'][r][c] = color
10422- drawAtoms.SetAttr(r,c,attr)
10423- UpdateDrawAtoms()
10424- dlg.Destroy( )
10413+ DrawAtomColor(event )
10414+ # colors = wx.ColourData( )
10415+ # colors.SetChooseFull(True )
10416+ # dlg = wx.ColourDialog(G2frame.GetParent(),colors)
10417+ # if dlg.ShowModal() == wx.ID_OK:
10418+ # color = dlg.GetColourData().GetColour()[:3]
10419+ # dlg.Destroy( )
10420+ # attr = wg.GridCellAttr() #needs to be here - gets lost if outside loop!
10421+ # attr.SetReadOnly(True)
10422+ # attr.SetBackgroundColour( color)
10423+ # for r in range(len(atomData)):
10424+ # atomData[r][c] = color
10425+ # drawingData['Atoms'][r][c] = color
10426+ # drawAtoms.SetAttr(r,c,attr )
1042510427 elif drawAtoms.GetColLabelValue(c) == 'Residue':
1042610428 SetChoice('Residue',c,3)
1042710429 elif drawAtoms.GetColLabelValue(c) == '1-letter':
0 commit comments