Changeset 1381


Ignore:
Timestamp:
Jun 12, 2014 9:51:15 PM (7 years ago)
Author:
toby
Message:

fix blank initial GL window for structure

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1380 r1381  
    49684968    sizer.Add(line, 0, wx.EXPAND|wx.ALIGN_CENTER|wx.ALL, 10)
    49694969
     4970def HowDidIgetHere():
     4971    '''Show a traceback with calls that brought us to the current location.
     4972    Used for debugging.
     4973    '''
     4974    import traceback
     4975    print 70*'*'   
     4976    for i in traceback.format_list(traceback.extract_stack()[:-1]): print(i.strip.rstrip())
     4977    print 70*'*'   
     4978       
    49704979if __name__ == '__main__':
    49714980    app = wx.PySimpleApp()
  • trunk/GSASIIphsGUI.py

    r1378 r1381  
    53235323            FillSelectPageMenu(G2frame.dataFrame.DataDrawOptions)
    53245324            UpdateDrawOptions()
    5325             wx.CallAfter(G2plt.PlotStructure,G2frame,data)
     5325            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    53265326        elif text == 'Draw Atoms':
    53275327            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DrawAtomsMenu)
     
    53465346            G2frame.dataFrame.Bind(wx.EVT_MENU, OnDefineRB, id=G2gd.wxID_DRAWDEFINERB)
    53475347            UpdateDrawAtoms()
    5348             wx.CallAfter(G2plt.PlotStructure,G2frame,data)
     5348            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    53495349        elif text == 'RB Models':
    53505350            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.RigidBodiesMenu)
     
    53705370            G2frame.dataFrame.Bind(wx.EVT_MENU, OnPeaksClear, id=G2gd.wxID_PEAKSCLEAR)
    53715371            FillMapPeaksGrid()
    5372             wx.CallAfter(G2plt.PlotStructure,G2frame,data)
     5372            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    53735373        elif text == 'MC/SA':
    53745374            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.MCSAMenu)
     
    53805380            G2frame.dataFrame.Bind(wx.EVT_MENU, OnClearResults, id=G2gd.wxID_MCSACLEARRESULTS)
    53815381            UpdateMCSA()                       
    5382             wx.CallAfter(G2plt.PlotStructure,G2frame,data)
     5382            wx.CallAfter(G2plt.PlotStructure,G2frame,data,firstCall=True)
    53835383        elif text == 'Texture':
    53845384            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.TextureMenu)
  • trunk/GSASIIplot.py

    r1379 r1381  
    32073207################################################################################
    32083208           
    3209 def PlotStructure(G2frame,data):
     3209def PlotStructure(G2frame,data,firstCall=False):
    32103210    '''Crystal structure plotting package. Can show structures as balls, sticks, lines,
    32113211    thermal motion ellipsoids and polyhedra
     
    41394139        Draw('focus')
    41404140       
     4141    # PlotStructure execution starts here
    41414142    try:
    41424143        plotNum = G2frame.G2plotNB.plotList.index(generalData['Name'])
     
    41764177        pass
    41774178    Draw('main')
    4178        
     4179    if firstCall: Draw('main') # draw twice the first time that graphics are displayed
     4180
    41794181################################################################################
    41804182#### Plot Rigid Body
Note: See TracChangeset for help on using the changeset viewer.