Commit 583de985 authored by Maciej Suminski's avatar Maciej Suminski

Added required resets for tools.

parent 5d1ec2b2
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <class_board.h> #include <class_board.h>
#include <class_module.h> #include <class_module.h>
#include <io_mgr.h> #include <io_mgr.h>
#include <tool/tool_manager.h>
#include <pcbnew.h> #include <pcbnew.h>
#include <module_editor_frame.h> #include <module_editor_frame.h>
...@@ -126,6 +127,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) ...@@ -126,6 +127,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
m_Pcb->ComputeBoundingBox( false ); m_Pcb->ComputeBoundingBox( false );
EDA_RECT boardBbox = m_Pcb->GetBoundingBox(); EDA_RECT boardBbox = m_Pcb->GetBoundingBox();
GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) ); GetGalCanvas()->GetView()->SetViewport( BOX2D( boardBbox.GetOrigin(), boardBbox.GetSize() ) );
m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD );
} }
return true; return true;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include <module_editor_frame.h> #include <module_editor_frame.h>
#include <modview_frame.h> #include <modview_frame.h>
#include <collectors.h> #include <collectors.h>
#include <tool/tool_manager.h>
#include <dialog_edit_module_for_Modedit.h> #include <dialog_edit_module_for_Modedit.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
...@@ -935,6 +936,7 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable ) ...@@ -935,6 +936,7 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable )
{ {
SetBoard( m_Pcb ); SetBoard( m_Pcb );
m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH );
GetGalCanvas()->StartDrawing(); GetGalCanvas()->StartDrawing();
} }
} }
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