Changeset 1450


Ignore:
Timestamp:
Jul 31, 2014 4:21:22 PM (7 years ago)
Author:
toby
Message:

minor cleanups of Phase GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r1438 r1450  
    9494    '''
    9595
    96 #patch
    97     if 'RBModels' not in data:
    98         data['RBModels'] = {}
    99     if 'MCSA' not in data:
    100         data['MCSA'] = {'Models':[{'Type':'MD','Coef':[1.0,False,[.8,1.2],],'axis':[0,0,1]}],'Results':[],'AtInfo':{}}
    101     if isinstance(data['MCSA']['Results'],dict):
    102         data['MCSA']['Results'] = []
    103 #end patch   
    104 
    105     global rbAtmDict   
    106     rbAtmDict = {}
    107     if G2frame.dataDisplay:
    108         G2frame.dataDisplay.Destroy()
    109     PhaseName = G2frame.PatternTree.GetItemText(Item)
    110     G2gd.SetDataMenuBar(G2frame)
    111     G2frame.dataFrame.SetLabel('Phase Data for '+PhaseName)
    112     G2frame.dataFrame.CreateStatusBar()
    113     G2frame.dataDisplay = G2gd.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
    114     G2frame.dataDisplay.gridList = [] # list of all grids in notebook
    11596    # UpdatePhaseData execution continues below
    11697   
     
    52805261       
    52815262    def ChangePage(page):
     5263        # development: Log Tab Selection
     5264        #G2gd.LogTabPress(G2frame,page)
    52825265        text = G2frame.dataDisplay.GetPageText(page)
    52835266#        print 'Select',page,text
     
    53985381            G2gd.SetDataMenuBar(G2frame)
    53995382
    5400     # UpdatePhaseData execution continues here
     5383    # UpdatePhaseData execution starts here
     5384#patch
     5385    if 'RBModels' not in data:
     5386        data['RBModels'] = {}
     5387    if 'MCSA' not in data:
     5388        data['MCSA'] = {'Models':[{'Type':'MD','Coef':[1.0,False,[.8,1.2],],'axis':[0,0,1]}],'Results':[],'AtInfo':{}}
     5389    if isinstance(data['MCSA']['Results'],dict):
     5390        data['MCSA']['Results'] = []
     5391#end patch   
     5392
     5393    global rbAtmDict   
     5394    rbAtmDict = {}
     5395    if G2frame.dataDisplay:
     5396        G2frame.dataDisplay.Destroy()
     5397    PhaseName = G2frame.PatternTree.GetItemText(Item)
     5398    G2gd.SetDataMenuBar(G2frame)
     5399    G2frame.dataFrame.SetLabel('Phase Data for '+PhaseName)
     5400    G2frame.dataFrame.CreateStatusBar()
     5401    G2frame.dataDisplay = G2gd.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
     5402    G2frame.dataDisplay.gridList = [] # list of all grids in notebook
    54015403    Pages = []   
    54025404    wx.Frame.Unbind(G2frame.dataFrame,wx.EVT_SIZE) # ignore size events during this routine
     
    54385440    G2frame.dataFrame.AtomCompute.ISOcalc.Enable('ISODISTORT' in data)
    54395441    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    5440     SetupGeneral()   
    5441     GeneralData = data['General']
    5442     if oldPage is None:
     5442    if oldPage is None or oldPage == 0:
    54435443        ChangePage(0)
    54445444    elif oldPage:
     5445        SetupGeneral()    # not sure why one might need this when moving from phase to phase; but does not hurt
    54455446        G2frame.dataDisplay.SetSelection(oldPage)
    5446     else:
    5447         ChangePage(0)
Note: See TracChangeset for help on using the changeset viewer.