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