Remove boost::bind from BOARD_COMMIT

This commit is contained in:
Maciej Suminski 2016-11-28 15:31:56 +01:00
parent bb1390e2f1
commit 89a5f8ce69
1 changed files with 14 additions and 11 deletions

View File

@ -29,11 +29,11 @@
#include <ratsnest_data.h>
#include <view/view.h>
#include <board_commit.h>
#include <boost/bind.hpp>
#include <tools/pcb_tool.h>
#include <functional>
using namespace std::placeholders;
BOARD_COMMIT::BOARD_COMMIT( PCB_TOOL* aTool )
{
m_toolMgr = aTool->GetManager();
@ -117,7 +117,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage )
if( boardItem->Type() == PCB_MODULE_T )
{
MODULE* mod = static_cast<MODULE*>( boardItem );
mod->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
mod->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
}
}
else
@ -220,7 +220,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage )
MODULE* module = static_cast<MODULE*>( boardItem );
module->ClearFlags();
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
module->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
view->Remove( module );
@ -263,6 +263,9 @@ void BOARD_COMMIT::Push( const wxString& aMessage )
if( !m_editModules )
frame->SaveCopyInUndoList( undoList, UR_UNSPECIFIED );
if( TOOL_MANAGER* toolMgr = frame->GetToolManager() )
toolMgr->PostEvent( { TC_MESSAGE, TA_MODEL_CHANGE, AS_GLOBAL } );
ratsnest->Recalculate();
frame->OnModify();
frame->UpdateMsgPanel();
@ -306,7 +309,7 @@ void BOARD_COMMIT::Revert()
if( item->Type() == PCB_MODULE_T )
{
MODULE* oldModule = static_cast<MODULE*>( item );
oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
oldModule->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
}
view->Remove( item );
@ -317,8 +320,8 @@ void BOARD_COMMIT::Revert()
if( item->Type() == PCB_MODULE_T )
{
MODULE* newModule = static_cast<MODULE*>( item );
newModule->RunOnChildren( boost::bind( &EDA_ITEM::ClearFlags, _1, SELECTED ) );
newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
newModule->RunOnChildren( std::bind( &EDA_ITEM::ClearFlags, _1, SELECTED ) );
newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
}
view->Add( item );
@ -330,7 +333,7 @@ void BOARD_COMMIT::Revert()
if( item->Type() == PCB_MODULE_T )
{
MODULE* oldModule = static_cast<MODULE*>( item );
oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) );
oldModule->RunOnChildren( std::bind( &KIGFX::VIEW::Remove, view, _1 ) );
}
view->Remove( item );
@ -345,8 +348,8 @@ void BOARD_COMMIT::Revert()
if( item->Type() == PCB_MODULE_T )
{
MODULE* newModule = static_cast<MODULE*>( item );
newModule->RunOnChildren( boost::bind( &EDA_ITEM::ClearFlags, _1, SELECTED ) );
newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) );
newModule->RunOnChildren( std::bind( &EDA_ITEM::ClearFlags, _1, SELECTED ) );
newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
}
view->Add( item );