Modified way of switching canvas

This commit is contained in:
Maciej Suminski 2013-04-22 11:07:38 +02:00
parent ad4a72ff11
commit 1944fea398
2 changed files with 8 additions and 11 deletions

View File

@ -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 */
}

View File

@ -595,7 +595,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
}
void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event )
{
DIALOG_DESIGN_RULES dR_editor( this );