GAL: better progression between zoom in/zoom out (in/out/in sequence keeps the same zoom value)
This commit is contained in:
parent
1cffcafe2d
commit
8526935183
|
@ -58,7 +58,7 @@ int COMMON_TOOLS::ZoomInOut( const TOOL_EVENT& aEvent )
|
||||||
if( aEvent.IsAction( &ACTIONS::zoomIn ) )
|
if( aEvent.IsAction( &ACTIONS::zoomIn ) )
|
||||||
zoomScale = 1.3;
|
zoomScale = 1.3;
|
||||||
else if( aEvent.IsAction( &ACTIONS::zoomOut ) )
|
else if( aEvent.IsAction( &ACTIONS::zoomOut ) )
|
||||||
zoomScale = 0.7;
|
zoomScale = 1/1.3;
|
||||||
|
|
||||||
view->SetScale( view->GetScale() * zoomScale, getViewControls()->GetCursorPosition() );
|
view->SetScale( view->GetScale() * zoomScale, getViewControls()->GetCursorPosition() );
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ int COMMON_TOOLS::ZoomInOutCenter( const TOOL_EVENT& aEvent )
|
||||||
if( aEvent.IsAction( &ACTIONS::zoomInCenter ) )
|
if( aEvent.IsAction( &ACTIONS::zoomInCenter ) )
|
||||||
zoomScale = 1.3;
|
zoomScale = 1.3;
|
||||||
else if( aEvent.IsAction( &ACTIONS::zoomOutCenter ) )
|
else if( aEvent.IsAction( &ACTIONS::zoomOutCenter ) )
|
||||||
zoomScale = 0.7;
|
zoomScale = 1/1.3;
|
||||||
|
|
||||||
view->SetScale( view->GetScale() * zoomScale );
|
view->SetScale( view->GetScale() * zoomScale );
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
zoomScale = ( rotation > 0 ) ? 1.05 : 0.95;
|
zoomScale = ( rotation > 0 ) ? 1.05 : 1/1.05;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( IsCursorWarpingEnabled() )
|
if( IsCursorWarpingEnabled() )
|
||||||
|
|
Loading…
Reference in New Issue