Loading pcbnew/board_undo_redo.cpp +5 −4 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ */ #include <boost/bind.hpp> #include <fctsys.h> #include <fctsys.h> #include <class_drawpanel.h> #include <class_drawpanel.h> #include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h> Loading Loading @@ -522,7 +523,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* oldModule = static_cast<MODULE*>( item ); MODULE* oldModule = static_cast<MODULE*>( item ); oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); } } ratsnest->Remove( item ); ratsnest->Remove( item ); Loading @@ -533,7 +534,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* newModule = static_cast<MODULE*>( item ); MODULE* newModule = static_cast<MODULE*>( item ); newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); } } ratsnest->Add( item ); ratsnest->Add( item ); Loading @@ -549,7 +550,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( item ); MODULE* module = static_cast<MODULE*>( item ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); } } view->Remove( item ); view->Remove( item ); Loading @@ -563,7 +564,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( item ); MODULE* module = static_cast<MODULE*>( item ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1) ); } } view->Add( item ); view->Add( item ); Loading pcbnew/pcbframe.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -75,6 +75,7 @@ #endif #endif #include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h> #include <boost/bind.hpp> // Keys used in read/write config // Keys used in read/write config #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) Loading Loading @@ -524,7 +525,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Load modules and its additional elements // Load modules and its additional elements for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { { module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); view->Add( module ); view->Add( module ); } } Loading pcbnew/tools/drawing_tool.cpp +4 −5 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ */ #include <boost/bind.hpp> #include "drawing_tool.h" #include "drawing_tool.h" #include "common_actions.h" #include "common_actions.h" Loading Loading @@ -706,14 +707,13 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Add all the drawable parts to preview // Add all the drawable parts to preview preview.Add( module ); preview.Add( module ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) ); &preview ) ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } else else { { module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, m_view, _1 ) ); m_view->Add( module ); m_view->Add( module ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); Loading @@ -722,8 +722,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Remove from preview // Remove from preview preview.Remove( module ); preview.Remove( module ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Remove ), module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Remove, &preview, _1 ) ); &preview ) ); module = NULL; // to indicate that there is no module that we currently modify module = NULL; // to indicate that there is no module that we currently modify m_controls->ShowCursor( true ); m_controls->ShowCursor( true ); Loading pcbnew/tools/edit_tool.cpp +5 −6 Original line number Original line Diff line number Diff line Loading @@ -30,16 +30,15 @@ #include <view/view_controls.h> #include <view/view_controls.h> #include <ratsnest_data.h> #include <ratsnest_data.h> #include <confirm.h> #include <confirm.h> #include <cassert> #include <cassert> #include <boost/foreach.hpp> #include <boost/foreach.hpp> #include <boost/bind.hpp> #include "common_actions.h" #include "common_actions.h" #include "selection_tool.h" #include "selection_tool.h" #include "edit_tool.h" #include "edit_tool.h" using namespace KIGFX; using boost::optional; EDIT_TOOL::EDIT_TOOL() : EDIT_TOOL::EDIT_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) { { Loading Loading @@ -96,7 +95,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Offset from the dragged item's center (anchor) // Offset from the dragged item's center (anchor) wxPoint offset; wxPoint offset; VIEW_CONTROLS* controls = getViewControls(); KIGFX::VIEW_CONTROLS* controls = getViewControls(); PCB_EDIT_FRAME* editFrame = static_cast<PCB_EDIT_FRAME*>( m_toolMgr->GetEditFrame() ); PCB_EDIT_FRAME* editFrame = static_cast<PCB_EDIT_FRAME*>( m_toolMgr->GetEditFrame() ); controls->ShowCursor( true ); controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetSnapping( true ); Loading Loading @@ -163,7 +162,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_dragging = true; m_dragging = true; } } selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } } Loading Loading @@ -399,7 +398,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { { MODULE* module = static_cast<MODULE*>( aItem ); MODULE* module = static_cast<MODULE*>( aItem ); module->ClearFlags(); module->ClearFlags(); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), getView() ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, getView(), _1 ) ); // Module itself is deleted after the switch scope is finished // Module itself is deleted after the switch scope is finished // list of pads is rebuild by BOARD::BuildListOfNets() // list of pads is rebuild by BOARD::BuildListOfNets() Loading pcbnew/tools/selection_tool.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include <boost/foreach.hpp> #include <boost/foreach.hpp> #include <boost/optional.hpp> #include <boost/optional.hpp> #include <boost/bind.hpp> #include <cassert> #include <cassert> #include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h> Loading Loading @@ -556,7 +557,7 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( aItem ); MODULE* module = static_cast<MODULE*>( aItem ); module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::selectVisually ), this ) ); module->RunOnChildren( boost::bind( &SELECTION_TOOL::selectVisually, this, _1 ) ); } } selectVisually( aItem ); selectVisually( aItem ); Loading Loading @@ -587,7 +588,7 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( aItem ); MODULE* module = static_cast<MODULE*>( aItem ); module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::deselectVisually ), this ) ); module->RunOnChildren( boost::bind( &SELECTION_TOOL::deselectVisually, this, _1 ) ); } } deselectVisually( aItem ); deselectVisually( aItem ); Loading Loading
pcbnew/board_undo_redo.cpp +5 −4 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ */ #include <boost/bind.hpp> #include <fctsys.h> #include <fctsys.h> #include <class_drawpanel.h> #include <class_drawpanel.h> #include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h> Loading Loading @@ -522,7 +523,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* oldModule = static_cast<MODULE*>( item ); MODULE* oldModule = static_cast<MODULE*>( item ); oldModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); oldModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); } } ratsnest->Remove( item ); ratsnest->Remove( item ); Loading @@ -533,7 +534,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* newModule = static_cast<MODULE*>( item ); MODULE* newModule = static_cast<MODULE*>( item ); newModule->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); newModule->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); } } ratsnest->Add( item ); ratsnest->Add( item ); Loading @@ -549,7 +550,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( item ); MODULE* module = static_cast<MODULE*>( item ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, view, _1 ) ); } } view->Remove( item ); view->Remove( item ); Loading @@ -563,7 +564,7 @@ void PCB_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( item ); MODULE* module = static_cast<MODULE*>( item ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1) ); } } view->Add( item ); view->Add( item ); Loading
pcbnew/pcbframe.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -75,6 +75,7 @@ #endif #endif #include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h> #include <boost/bind.hpp> // Keys used in read/write config // Keys used in read/write config #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) Loading Loading @@ -524,7 +525,7 @@ void PCB_EDIT_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Load modules and its additional elements // Load modules and its additional elements for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { { module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, view, _1 ) ); view->Add( module ); view->Add( module ); } } Loading
pcbnew/tools/drawing_tool.cpp +4 −5 Original line number Original line Diff line number Diff line Loading @@ -22,6 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ */ #include <boost/bind.hpp> #include "drawing_tool.h" #include "drawing_tool.h" #include "common_actions.h" #include "common_actions.h" Loading Loading @@ -706,14 +707,13 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Add all the drawable parts to preview // Add all the drawable parts to preview preview.Add( module ); preview.Add( module ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Add ), module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) ); &preview ) ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } else else { { module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Add ), m_view ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Add, m_view, _1 ) ); m_view->Add( module ); m_view->Add( module ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); module->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); Loading @@ -722,8 +722,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent ) // Remove from preview // Remove from preview preview.Remove( module ); preview.Remove( module ); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW_GROUP::Remove ), module->RunOnChildren( boost::bind( &KIGFX::VIEW_GROUP::Remove, &preview, _1 ) ); &preview ) ); module = NULL; // to indicate that there is no module that we currently modify module = NULL; // to indicate that there is no module that we currently modify m_controls->ShowCursor( true ); m_controls->ShowCursor( true ); Loading
pcbnew/tools/edit_tool.cpp +5 −6 Original line number Original line Diff line number Diff line Loading @@ -30,16 +30,15 @@ #include <view/view_controls.h> #include <view/view_controls.h> #include <ratsnest_data.h> #include <ratsnest_data.h> #include <confirm.h> #include <confirm.h> #include <cassert> #include <cassert> #include <boost/foreach.hpp> #include <boost/foreach.hpp> #include <boost/bind.hpp> #include "common_actions.h" #include "common_actions.h" #include "selection_tool.h" #include "selection_tool.h" #include "edit_tool.h" #include "edit_tool.h" using namespace KIGFX; using boost::optional; EDIT_TOOL::EDIT_TOOL() : EDIT_TOOL::EDIT_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) TOOL_INTERACTIVE( "pcbnew.InteractiveEdit" ), m_selectionTool( NULL ) { { Loading Loading @@ -96,7 +95,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Offset from the dragged item's center (anchor) // Offset from the dragged item's center (anchor) wxPoint offset; wxPoint offset; VIEW_CONTROLS* controls = getViewControls(); KIGFX::VIEW_CONTROLS* controls = getViewControls(); PCB_EDIT_FRAME* editFrame = static_cast<PCB_EDIT_FRAME*>( m_toolMgr->GetEditFrame() ); PCB_EDIT_FRAME* editFrame = static_cast<PCB_EDIT_FRAME*>( m_toolMgr->GetEditFrame() ); controls->ShowCursor( true ); controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetSnapping( true ); Loading Loading @@ -163,7 +162,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) m_dragging = true; m_dragging = true; } } selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate ); } } Loading Loading @@ -399,7 +398,7 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) { { MODULE* module = static_cast<MODULE*>( aItem ); MODULE* module = static_cast<MODULE*>( aItem ); module->ClearFlags(); module->ClearFlags(); module->RunOnChildren( std::bind1st( std::mem_fun( &KIGFX::VIEW::Remove ), getView() ) ); module->RunOnChildren( boost::bind( &KIGFX::VIEW::Remove, getView(), _1 ) ); // Module itself is deleted after the switch scope is finished // Module itself is deleted after the switch scope is finished // list of pads is rebuild by BOARD::BuildListOfNets() // list of pads is rebuild by BOARD::BuildListOfNets() Loading
pcbnew/tools/selection_tool.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include <boost/foreach.hpp> #include <boost/foreach.hpp> #include <boost/optional.hpp> #include <boost/optional.hpp> #include <boost/bind.hpp> #include <cassert> #include <cassert> #include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h> Loading Loading @@ -556,7 +557,7 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( aItem ); MODULE* module = static_cast<MODULE*>( aItem ); module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::selectVisually ), this ) ); module->RunOnChildren( boost::bind( &SELECTION_TOOL::selectVisually, this, _1 ) ); } } selectVisually( aItem ); selectVisually( aItem ); Loading Loading @@ -587,7 +588,7 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T ) { { MODULE* module = static_cast<MODULE*>( aItem ); MODULE* module = static_cast<MODULE*>( aItem ); module->RunOnChildren( std::bind1st( std::mem_fun( &SELECTION_TOOL::deselectVisually ), this ) ); module->RunOnChildren( boost::bind( &SELECTION_TOOL::deselectVisually, this, _1 ) ); } } deselectVisually( aItem ); deselectVisually( aItem ); Loading