Ignore:
Timestamp:
May 16, 2018 10:31:09 AM (4 years ago)
Author:
vondreele
Message:

fix issue with deleted phases in Restraints - they are now deleted from Restraints tree if selected
fix issue of a phase not used in any histogram - any set refine flags cause crash in refinement
now a phase is included in phase list if it is Used in any histogrsm - fixes to GetUsedHistogramsAndPhases? in G2strIO and GetUsedHistogramsAndPhasesfromTree? in G2dataGUI.
also some weird business in G2spc - had to swap two routines (SGProd & GetLittleGrpOps?) before debug in Spyder would load GSAS-II.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIrestrGUI.py

    r3356 r3390  
    19071907
    19081908    # UpdateRestraints execution starts here
    1909     phasedata = G2frame.GetPhaseData()[phaseName]
    1910     restrData = data
     1909    try:
     1910        phasedata = G2frame.GetPhaseData()[phaseName]
     1911    except KeyError:        #delete unknown or previously deleted phases from Restraints
     1912        rId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Restraints')
     1913        pId = G2gd.GetGPXtreeItemId(G2frame,rId,phaseName)
     1914        G2frame.GPXtree.Delete(pId)
     1915        print('Unknown phase '+phaseName+' is deleted from Restraints')
     1916        return
     1917    restrData = data[phaseName]
    19111918    if 'Bond' not in restrData:
    19121919        restrData['Bond'] = {'wtFactor':1.0,'Range':1.1,'Bonds':[],'Use':True}
Note: See TracChangeset for help on using the changeset viewer.