Commit 1944fea3 authored by Maciej Suminski's avatar Maciej Suminski

Modified way of switching canvas

parent ad4a72ff
......@@ -966,11 +966,6 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
view->SetScale( zoom );
view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) );
// Switch panes
m_auimgr.GetPane( wxT( "DrawFrame" ) ).Hide();
m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show();
m_auimgr.Update();
}
else
{
......@@ -979,13 +974,16 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
VECTOR2D center = view->GetCenter();
RedrawScreen( wxPoint( center.x, center.y ), false );
// Switch panes
m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Hide();
m_auimgr.GetPane( wxT( "DrawFrame" ) ).Show();
m_auimgr.Update();
}
m_canvas->SetEvtHandlerEnabled( !aEnable );
m_galCanvas->SetEvtHandlerEnabled( aEnable );
// Switch panes
m_auimgr.GetPane( wxT( "DrawFrame" ) ).Show( !aEnable );
m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable );
m_auimgr.Update();
m_galCanvasActive = aEnable;
#endif /* KICAD_GAL */
}
......@@ -595,7 +595,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
}
void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event )
{
DIALOG_DESIGN_RULES dR_editor( this );
......
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