Changeset 2674 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Jan 30, 2017 2:25:48 PM (5 years ago)
Author:
vondreele
Message:

prevent delete if PWDR if corresponding PDF exists
use PickElements? instead of PickElement? - allows multiple selection, blacks out ones already picked & can unpick a pick
add delete spots option to masks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2673 r2674  
    49334933    def OnAddElement(event):
    49344934        ElList = data['ElList']
    4935         PE = G2elemGUI.PickElement(G2frame,oneOnly=True,multiple=True)
     4935        choice = ElList.keys()
     4936        PE = G2elemGUI.PickElements(G2frame,choice)
    49364937        if PE.ShowModal() == wx.ID_OK:
    4937             for El in PE.elementList:
    4938                 if El not in ElList and El != 'None':
     4938            for El in PE.Elem:
     4939                if El not in ElList:
    49394940                    try:
    49404941                        data['ElList'][El] = G2elem.GetElInfo(El,inst)
     
    52515252    noRing.SetValue(data['noRing'])
    52525253    noRing.Bind(wx.EVT_CHECKBOX, OnNoRing)
    5253     sqBox.Add(noRing,0)
     5254    sqBox.Add(noRing,0,WACV)
    52545255    mainSizer.Add(sqBox,0)
    52555256
     
    53265327        Source = G2frame.PatternTree.GetItemText(G2frame.PatternId)
    53275328        if len(TextList) == 1:
    5328             G2frame.ErrorDialog('Nothing to copy controls to','There must be more than one "PDF" pattern')
     5329            G2frame.ErrorDialog('Nothing to copy PDF peaks to','There must be more than one "PDF" pattern')
    53295330            return
    53305331        dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy PDF peaks','Copy peaks from '+Source+' to:',TextList)
     
    53425343       
    53435344    def OnFitPDFpeaks(event):
     5345        PatternId = G2frame.PatternId
     5346        data = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'PDF Controls'))['G(R)']
     5347        peaks = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'PDF Peaks'))
     5348        if not peaks:
     5349            G2frame.ErrorDialog('No peaks!','Nothing to fit!')
     5350            return
     5351       
    53445352        print 'fit peaks'
    53455353       
Note: See TracChangeset for help on using the changeset viewer.