From 583de985c7e7766754c4c416095970e9f8d25d07 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH] Added required resets for tools. --- pcbnew/loadcmp.cpp | 2 ++ pcbnew/modedit.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 47a4728e92..21113267a2 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) m_Pcb->ComputeBoundingBox( false ); EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); } return true; diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 1d3283a276..ba76b1e0de 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -935,6 +936,7 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable ) { SetBoard( m_Pcb ); + m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH ); GetGalCanvas()->StartDrawing(); } }