Changeset 2872


Ignore:
Timestamp:
Jun 22, 2017 10:24:43 PM (4 years ago)
Author:
toby
Message:

include only added histograms in Phase/Data? operations

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r2869 r2872  
    12981298    :param str title: heading above list of choices
    12991299    :param str header: Title to place on window frame
    1300     :param list ChoiceList: a list of choices where one will be selected
     1300    :param list ChoiceList: a list of choices where one more will be selected
    13011301    :param bool toggle: If True (default) the toggle and select all buttons
    13021302      are displayed
  • trunk/GSASIIphsGUI.py

    r2864 r2872  
    974974               
    975975            def OnRefList(event):
     976                if not refsList:
     977                    G2G.G2MessageBox(G2frame.dataFrame,'No reflections')
     978                    return
    976979                dlg = G2G.G2MultiChoiceDialog(G2frame, 'Select reflection sets to use',
    977980                    'Use data',refsList)
     
    55655568                TextList.append(name)
    55665569            item, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie)                       
     5570            if not TextList:
     5571                G2G.G2MessageBox(G2frame.dataFrame,'No reflections')
     5572                return
    55675573        dlg = G2G.G2MultiChoiceDialog(G2frame, 'Select reflection sets to use',
    55685574            'Use data',TextList)
     
    56215627        UseList = data['Histograms']
    56225628        hist = G2frame.hist
    5623         keyList = G2frame.GetHistogramNames(hist[:4])
     5629        keyList = sorted(UseList.keys())
    56245630        if UseList:
    56255631            dlg = G2G.G2MultiChoiceDialog(G2frame.dataFrame, 'Use histograms',
     
    56525658        UseList = data['Histograms']
    56535659        hist = G2frame.hist
    5654         keyList = G2frame.GetHistogramNames(hist[:4])[:]
     5660        keyList = sorted(UseList.keys())
    56555661        if hist in keyList: keyList.remove(hist)
    56565662        sourceDict = UseList[hist]
     
    57075713                for bab in babNames:
    57085714                    copyDict[name][bab] = sourceDict[name][bab][1]                       
    5709         keyList = G2frame.GetHistogramNames(hist[:4])[:]
     5715        keyList = sorted(UseList.keys())
    57105716        if hist in keyList: keyList.remove(hist)
    57115717        if UseList:
     
    57525758        UseList = data['Histograms']
    57535759        hist = G2frame.hist
    5754         keyList = G2frame.GetHistogramNames(hist[:4])[:]
     5760        keyList = sorted(UseList.keys())
    57555761        if hist in keyList: keyList.remove(hist)
    57565762        sourceDict = UseList[hist]
     
    57995805                    TextList.append(name)
    58005806                item, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie)
    5801             dlg = G2G.G2MultiChoiceDialog(G2frame, 'Select reflection sets to use',
     5807            if not TextList:
     5808                G2G.G2MessageBox(G2frame.dataFrame,'No histograms')
     5809                return
     5810            dlg = G2G.G2MultiChoiceDialog(G2frame, 'Select powder histograms to use',
    58025811                    'Use data',TextList)
    58035812            try:
     
    58265835    def OnDataDelete(event):
    58275836        UseList = data['Histograms']
    5828         keyList = UseList.keys()
     5837        keyList = sorted(UseList.keys())
    58295838        keyList.sort()
    58305839        if UseList:
Note: See TracChangeset for help on using the changeset viewer.