Changeset 924 for trunk/GSASIIplot.py


Ignore:
Timestamp:
May 17, 2013 5:24:47 PM (10 years ago)
Author:
toby
Message:

plot fixes: save more Draw Options widgets & reference directly; fix mousewheel on mac, where smaller movements are possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r922 r924  
    28362836        if event.ShiftDown():
    28372837            return
    2838         drawingData['cameraPos'] += event.GetWheelRotation()/24
     2838        drawingData['cameraPos'] += event.GetWheelRotation()/24.
    28392839        drawingData['cameraPos'] = max(10,min(500,drawingData['cameraPos']))
    28402840        G2frame.G2plotNB.status.SetStatusText('New camera distance: %.2f'%(drawingData['cameraPos']),1)
     
    28422842        if page:
    28432843            if G2frame.dataDisplay.GetPageText(page) == 'Draw Options':
    2844                 panel = G2frame.dataDisplay.GetPage(page).GetChildren()[0].GetChildren()
    2845                 names = [child.GetName() for child in panel]
    2846                 panel[names.index('cameraPos')].SetLabel('Camera Position: '+'%.2f'%(drawingData['cameraPos']))
    2847                 panel[names.index('cameraSlider')].SetValue(drawingData['cameraPos'])
     2844                G2frame.dataDisplay.cameraPosTxt.SetLabel('Camera Position: '+'%.2f'%(drawingData['cameraPos']))
     2845                G2frame.dataDisplay.cameraSlider.SetValue(drawingData['cameraPos'])
    28482846            Draw('wheel')
    28492847       
     
    28592857        if page:
    28602858            if G2frame.dataDisplay.GetPageText(page) == 'Draw Options':
    2861                 panel = G2frame.dataDisplay.GetPage(page).GetChildren()[0].GetChildren()
    2862                 names = [child.GetName() for child in panel]
    2863                 panel[names.index('viewPoint')].SetValue('%.3f %.3f %.3f'%(VP[0],VP[1],VP[2]))
     2859                G2frame.dataDisplay.viewPoint.SetValue('%.3f %.3f %.3f'%(VP[0],VP[1],VP[2]))
    28642860               
    28652861    def SetRBOrigText():
Note: See TracChangeset for help on using the changeset viewer.