Added required resets for tools.

This commit is contained in:
Maciej Suminski 2014-07-09 13:50:27 +02:00
parent 5d1ec2b204
commit 583de985c7
2 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,7 @@
#include <class_board.h>
#include <class_module.h>
#include <io_mgr.h>
#include <tool/tool_manager.h>
#include <pcbnew.h>
#include <module_editor_frame.h>
@ -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;

View File

@ -50,6 +50,7 @@
#include <module_editor_frame.h>
#include <modview_frame.h>
#include <collectors.h>
#include <tool/tool_manager.h>
#include <dialog_edit_module_for_Modedit.h>
#include <wildcards_and_files_ext.h>
@ -935,6 +936,7 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable )
{
SetBoard( m_Pcb );
m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH );
GetGalCanvas()->StartDrawing();
}
}