Added TOOL_INTERACTIVE::Activate().

Removed an unnecessary header from class_board_item.h.
This commit is contained in:
Maciej Suminski 2014-02-06 14:45:33 +01:00
parent 5c9e7d9b9b
commit 363709e7a9
4 changed files with 14 additions and 3 deletions

View File

@ -46,6 +46,12 @@ TOOL_INTERACTIVE::~TOOL_INTERACTIVE()
} }
void TOOL_INTERACTIVE::Activate()
{
m_toolMgr->InvokeTool( m_toolId );
}
OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait( const TOOL_EVENT_LIST& aEventList ) OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait( const TOOL_EVENT_LIST& aEventList )
{ {
return m_toolMgr->ScheduleWait( this, aEventList ); return m_toolMgr->ScheduleWait( this, aEventList );

View File

@ -33,7 +33,6 @@
#include <base_struct.h> #include <base_struct.h>
#include <gr_basic.h> #include <gr_basic.h>
#include <boost/ptr_container/ptr_vector.hpp>
#include <layers_id_colors_and_visibility.h> #include <layers_id_colors_and_visibility.h>
/// Abbrevation for fomatting internal units to a string. /// Abbrevation for fomatting internal units to a string.

View File

@ -48,6 +48,12 @@ public:
TOOL_INTERACTIVE( const std::string& aName ); TOOL_INTERACTIVE( const std::string& aName );
virtual ~TOOL_INTERACTIVE(); virtual ~TOOL_INTERACTIVE();
/**
* Function Activate()
* Runs the tool. After activation, the tool starts receiving events until it is finished.
*/
void Activate();
/** /**
* Function SetContextMenu() * Function SetContextMenu()
* *

View File

@ -968,11 +968,11 @@ void RN_DATA::Recalculate( int aNet )
{ {
if( aNet < 0 ) // Recompute everything if( aNet < 0 ) // Recompute everything
{ {
unsigned int tid, i, chunk, netCount; unsigned int i, netCount;
netCount = m_board->GetNetCount(); netCount = m_board->GetNetCount();
chunk = 1;
#ifdef USE_OPENMP #ifdef USE_OPENMP
unsigned int chunk = 1, tid;
#pragma omp parallel shared(chunk, netCount) private(i, tid) #pragma omp parallel shared(chunk, netCount) private(i, tid)
{ {
tid = omp_get_thread_num(); tid = omp_get_thread_num();