Fix for vertical/horizontal (using Ctrl/Shift + mousewheel) panning in GAL canvas.

This commit is contained in:
Maciej Suminski 2014-05-31 11:48:27 +02:00
parent 4f678a919c
commit 0e69277074
1 changed files with 2 additions and 2 deletions

View File

@ -134,8 +134,8 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
if( aEvent.ControlDown() || aEvent.ShiftDown() ) if( aEvent.ControlDown() || aEvent.ShiftDown() )
{ {
// Scrolling // Scrolling
VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize() * VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize(), false ) *
( (double) aEvent.GetWheelRotation() * wheelPanSpeed ), false ); ( (double) aEvent.GetWheelRotation() * wheelPanSpeed );
double scrollSpeed; double scrollSpeed;
if( abs( scrollVec.x ) > abs( scrollVec.y ) ) if( abs( scrollVec.x ) > abs( scrollVec.y ) )