Changeset 759


Ignore:
Timestamp:
Sep 17, 2012 2:38:13 AM (11 years ago)
Author:
vondreele
Message:

fix excessive redraws of structure - no redraw on setfocus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r758 r759  
    24432443            SetPeakRoll(dirDict[key])
    24442444            SetMapPeaksText(mapPeaks)
    2445         Draw()
     2445        Draw('key')
    24462446           
    24472447    def GetTruePosition(xy,Add=False):
     
    25112511                Q = drawingData['Quaternion']
    25122512                G2frame.G2plotNB.status.SetStatusText('New quaternion: %.2f+, %.2fi+ ,%.2fj+, %.2fk'%(Q[0],Q[1],Q[2],Q[3]),1)
    2513             Draw()
     2513            Draw('move')
    25142514       
    25152515    def OnMouseWheel(event):
     
    25262526                panel[names.index('cameraPos')].SetLabel('Camera Position: '+'%.2f'%(drawingData['cameraPos']))
    25272527                panel[names.index('cameraSlider')].SetValue(drawingData['cameraPos'])
    2528             Draw()
     2528            Draw('wheel')
    25292529       
    25302530    def getSelection():
     
    28852885        RenderDots(XYZ,RC)
    28862886                           
    2887     def Draw():
     2887    def Draw(caller=''):
     2888#useful debug?       
     2889#        if caller:
     2890#            print caller
     2891# end of useful debug
    28882892        mapData = generalData['Map']
    28892893        pageName = ''
     
    30593063       
    30603064    def OnSize(event):
    3061         Draw()
    3062        
    3063     def OnFocus(event):
    3064         Draw()
     3065        Draw('size')
     3066       
     3067    def OnFocus(event):         #not needed?? Bind commented out below
     3068        Draw('focus')
    30653069       
    30663070    try:
     
    30893093    Page.canvas.Bind(wx.EVT_MOTION, OnMouseMove)
    30903094    Page.canvas.Bind(wx.EVT_SIZE, OnSize)
    3091     Page.canvas.Bind(wx.EVT_SET_FOCUS, OnFocus)
     3095#    Page.canvas.Bind(wx.EVT_SET_FOCUS, OnFocus)
    30923096    Page.camera['position'] = drawingData['cameraPos']
    30933097    Page.camera['viewPoint'] = np.inner(Amat,drawingData['viewPoint'][0])
    30943098    Page.camera['backColor'] = np.array(list(drawingData['backColor'])+[0,])/255.
    30953099    Page.canvas.SetCurrent()
    3096     Draw()
    3097        
     3100    Draw('main')
     3101       
Note: See TracChangeset for help on using the changeset viewer.