Changeset 922


Ignore:
Timestamp:
May 17, 2013 4:15:28 PM (9 years ago)
Author:
toby
Message:

prevent phase tab from multiple call by plot using CallAfter?

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r916 r922  
    1010'''
    1111*GSASIIphsGUI: Phase GUI*
    12 =========================
     12-------------------------
     13
    1314Module to create the GUI for display of phase information
    1415in the data display window when a phase is selected.
     
    26772678            viewDir.Bind(wx.EVT_TEXT_ENTER,OnViewDir)
    26782679            viewDir.Bind(wx.EVT_KILL_FOCUS,OnViewDir)
     2680            G2frame.dataDisplay.viewDir = viewDir
    26792681            lineSizer.Add(viewDir,0,wx.ALIGN_CENTER_VERTICAL)
    26802682            showSizer.Add(lineSizer)
     
    44334435            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataDrawOptions)
    44344436            UpdateDrawOptions()
    4435             G2plt.PlotStructure(G2frame,data)
     4437            #G2plt.PlotStructure(G2frame,data)
     4438            wx.CallAfter(G2plt.PlotStructure,G2frame,data)
    44364439        elif text == 'Draw Atoms':
    44374440            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DrawAtomsMenu)
     
    44834486            G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2gd.wxID_PEAKSCLEAR)
    44844487            FillMapPeaksGrid()
    4485             G2plt.PlotStructure(G2frame,data)
     4488            #G2plt.PlotStructure(G2frame,data)
     4489            wx.CallAfter(G2plt.PlotStructure,G2frame,data)
    44864490        elif text == 'Texture':
    44874491            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.TextureMenu)
  • trunk/GSASIIplot.py

    r910 r922  
    28812881        if page:
    28822882            if G2frame.dataDisplay.GetPageText(page) == 'Draw Options':
    2883                 panel = G2frame.dataDisplay.GetPage(page).GetChildren()[0].GetChildren()
    2884                 names = [child.GetName() for child in panel]
    2885                 panel[names.index('viewDir')].SetValue('%.3f %.3f %.3f'%(VD[0],VD[1],VD[2]))
     2883                G2frame.dataDisplay.viewDir.SetValue('%.3f %.3f %.3f'%(VD[0],VD[1],VD[2]))
    28862884               
    28872885    def SetMapPeaksText(mapPeaks):
Note: See TracChangeset for help on using the changeset viewer.