Commit 180c72ef authored by Maciej Sumiński's avatar Maciej Sumiński

Added possibility to change zoom using toolbar in GAL.

parent d81a351c
......@@ -426,6 +426,20 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
return;
GetScreen()->SetZoom( selectedZoom );
if( m_galCanvasActive )
{
// Apply computed view settings to GAL
KiGfx::VIEW* view = m_galCanvas->GetView();
KiGfx::GAL* gal = m_galCanvas->GetGAL();
double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor();
double zoom = 1.0 / ( zoomFactor * GetZoom() );
view->SetScale( zoom );
m_galCanvas->Refresh();
}
else
RedrawScreen( GetScreen()->GetScrollCenterPosition(), false );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment