Changeset 924


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

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r922 r924  
    25342534            cameraPosTxt = wx.StaticText(drawOptions,-1,
    25352535                ' Camera Distance: '+'%.2f'%(drawingData['cameraPos']),name='cameraPos')
     2536            G2frame.dataDisplay.cameraPosTxt = cameraPosTxt
    25362537            slideSizer.Add(cameraPosTxt,0,wx.ALIGN_CENTER_VERTICAL)
    25372538            cameraPos = wx.Slider(drawOptions,style=wx.SL_HORIZONTAL,value=drawingData['cameraPos'],name='cameraSlider')
    25382539            cameraPos.SetRange(10,500)
    25392540            cameraPos.Bind(wx.EVT_SLIDER, OnCameraPos)
     2541            G2frame.dataDisplay.cameraSlider = cameraPos
    25402542            slideSizer.Add(cameraPos,1,wx.EXPAND|wx.RIGHT)
    25412543           
     
    26922694            viewPoint = wx.TextCtrl(drawOptions,value='%.3f %.3f %.3f'%(VP[0],VP[1],VP[2]),
    26932695                style=wx.TE_PROCESS_ENTER,size=wx.Size(140,20),name='viewPoint')
     2696            G2frame.dataDisplay.viewPoint = viewPoint
    26942697            viewPoint.Bind(wx.EVT_TEXT_ENTER,OnViewPoint)
    26952698            viewPoint.Bind(wx.EVT_KILL_FOCUS,OnViewPoint)
  • 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.