Ignore:
Timestamp:
Jul 5, 2017 6:57:25 PM (4 years ago)
Author:
toby
Message:

fix menu binds to dataWindow; fix Help menu for non-mac; dataFrame removal done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIddataGUI.py

    r2908 r2911  
    770770       
    771771    def OnSelect(event):
    772         G2frame.hist = G2frame.dataFrame.HistsInPhase[select.GetSelection()]
     772        G2frame.hist = G2frame.dataWindow.HistsInPhase[select.GetSelection()]
    773773        oldFocus = wx.Window.FindFocus()
    774774        G2plt.PlotSizeStrainPO(G2frame,data,G2frame.hist)
     
    782782        mainSizer.Add(G2frame.bottomSizer)
    783783        mainSizer.Layout()
    784         G2frame.dataFrame.Refresh()
     784        G2frame.dataWindow.Refresh()
    785785        DData.SetVirtualSize(mainSizer.GetMinSize())
    786786        DData.Scroll(0,Scroll)
    787         G2frame.dataFrame.SendSizeEvent()
     787        G2frame.dataWindow.SendSizeEvent()
    788788       
    789789    def ShowHistogramInfo():
     
    965965    UseList = data['Histograms']
    966966    if UseList:
    967         G2frame.dataFrame.DataMenu.Enable(G2gd.wxID_DATADELETE,True)
     967        G2frame.dataWindow.DataMenu.Enable(G2gd.wxID_DATADELETE,True)
    968968        for item in G2frame.Refine: item.Enable(True)
    969969    else:
    970         G2frame.dataFrame.DataMenu.Enable(G2gd.wxID_DATADELETE,False)
     970        G2frame.dataWindow.DataMenu.Enable(G2gd.wxID_DATADELETE,False)
    971971        for item in G2frame.Refine: item.Enable(False)
    972972    # make a list of histograms (any type) used in this phase, ordered as in tree
    973     G2frame.dataFrame.HistsInPhase = [name for name in keyList if name in UseList]
     973    G2frame.dataWindow.HistsInPhase = [name for name in keyList if name in UseList]
    974974    generalData = data['General']
    975975    PhaseName = generalData['Name']       
    976976    SGData = generalData['SGData']
    977     if len(G2frame.dataFrame.HistsInPhase) == 0: # no associated histograms, nothing to display here
     977    if len(G2frame.dataWindow.HistsInPhase) == 0: # no associated histograms, nothing to display here
    978978        G2frame.hist = ''
    979     elif hist and hist in G2frame.dataFrame.HistsInPhase: # something was input as a selection as an argument
     979    elif hist and hist in G2frame.dataWindow.HistsInPhase: # something was input as a selection as an argument
    980980        G2frame.hist = hist
    981     elif (not G2frame.hist) or (G2frame.hist not in G2frame.dataFrame.HistsInPhase): # no or bad selection but have data, take the first
    982         G2frame.hist = G2frame.dataFrame.HistsInPhase[0]
     981    elif (not G2frame.hist) or (G2frame.hist not in G2frame.dataWindow.HistsInPhase): # no or bad selection but have data, take the first
     982        G2frame.hist = G2frame.dataWindow.HistsInPhase[0]
    983983    Indx = {}
    984984   
     
    989989    if G2frame.hist:
    990990        topSizer = wx.FlexGridSizer(1,2,5,5)
    991         select = wx.ListBox(DData,choices=G2frame.dataFrame.HistsInPhase,
     991        select = wx.ListBox(DData,choices=G2frame.dataWindow.HistsInPhase,
    992992                            style=wx.LB_SINGLE,size=(-1,120))
    993         select.SetSelection(G2frame.dataFrame.HistsInPhase.index(G2frame.hist))
    994         select.SetFirstItem(G2frame.dataFrame.HistsInPhase.index(G2frame.hist))
     993        select.SetSelection(G2frame.dataWindow.HistsInPhase.index(G2frame.hist))
     994        select.SetFirstItem(G2frame.dataWindow.HistsInPhase.index(G2frame.hist))
    995995        select.Bind(wx.EVT_LISTBOX,OnSelect)
    996996        topSizer.Add(select,0,WACV|wx.LEFT,5)
     
    10031003        mainSizer.Add(wx.StaticText(DData,wx.ID_ANY,'  (This project has no data; use Import to read it)'),
    10041004                      0,WACV|wx.TOP,10)
    1005     elif not UseList in G2frame.dataFrame.HistsInPhase:
     1005    elif not UseList in G2frame.dataWindow.HistsInPhase:
    10061006        mainSizer.Add(wx.StaticText(DData,wx.ID_ANY,'  (This phase has no associated data; use appropriate Edit/Add... menu item)'),
    10071007                      0,WACV|wx.TOP,10)
Note: See TracChangeset for help on using the changeset viewer.