From 7314acf0532700bc1a1aed4af3066b2734dac552 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 26 Jul 2019 13:19:17 -0600 Subject: [PATCH] Renaming. --- pcbnew/tools/pcb_actions.cpp | 2 +- pcbnew/tools/pcb_actions.h | 2 +- pcbnew/tools/pcb_editor_control.cpp | 4 ++-- pcbnew/tools/selection_tool.cpp | 6 +++--- pcbnew/tools/selection_tool.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index 12ea3112e5..1f6159fbc4 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -1046,7 +1046,7 @@ TOOL_ACTION PCB_ACTIONS::selectSameSheet( "pcbnew.InteractiveSelection.SelectSam _( "Selects all modules and tracks in the same schematic sheet" ), select_same_sheet_xpm ); -TOOL_ACTION PCB_ACTIONS::findMove( "pcbnew.InteractiveSelection.FindMove", +TOOL_ACTION PCB_ACTIONS::getAndPlace( "pcbnew.InteractiveSelection.FindMove", AS_GLOBAL, 'T', LEGACY_HK_NAME( "Get and Move Footprint" ), _( "Get and Move Footprint" ), diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 3753958ab0..47cfe73cd2 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -426,7 +426,7 @@ public: static TOOL_ACTION find; /// Find an item and start moving - static TOOL_ACTION findMove; + static TOOL_ACTION getAndPlace; static TOOL_ACTION autoplaceOffboardComponents; static TOOL_ACTION autoplaceSelectedComponents; diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index a3fd85cba5..1b9214fe2f 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -192,7 +192,7 @@ bool PCB_EDITOR_CONTROL::Init() ctxMenu.AddSeparator( 1 ); // "Get and Place Footprint" should be available for Place Footprint tool - ctxMenu.AddItem( PCB_ACTIONS::findMove, placeModuleCondition, 1000 ); + ctxMenu.AddItem( PCB_ACTIONS::getAndPlace, placeModuleCondition, 1000 ); ctxMenu.AddSeparator( 1000 ); // Finally, add the standard zoom & grid items @@ -214,7 +214,7 @@ bool PCB_EDITOR_CONTROL::Init() auto& menu = toolMenu.GetMenu(); // Add "Get and Place Footprint" when Selection tool is in an inactive state - menu.AddItem( PCB_ACTIONS::findMove, inactiveStateCondition ); + menu.AddItem( PCB_ACTIONS::getAndPlace, inactiveStateCondition ); menu.AddSeparator(); toolMenu.AddSubMenu( zoneMenu ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 39875d4193..397150f188 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1087,7 +1087,7 @@ void SELECTION_TOOL::findCallback( BOARD_ITEM* aItem ) if( aItem ) { select( aItem ); - getView()->SetCenter( aItem->GetPosition() ); + m_frame->FocusOnLocation( aItem->GetPosition() ); // Inform other potentially interested tools m_toolMgr->ProcessEvent( EVENTS::SelectedEvent ); @@ -1107,7 +1107,7 @@ int SELECTION_TOOL::find( const TOOL_EVENT& aEvent ) } -int SELECTION_TOOL::findMove( const TOOL_EVENT& aEvent ) +int SELECTION_TOOL::GetAndPlace( const TOOL_EVENT& aEvent ) { MODULE* module = m_frame->GetFootprintFromBoardByReference(); @@ -2209,7 +2209,7 @@ void SELECTION_TOOL::setTransitions() Go( &SELECTION_TOOL::SelectionMenu, PCB_ACTIONS::selectionMenu.MakeEvent() ); Go( &SELECTION_TOOL::find, ACTIONS::find.MakeEvent() ); - Go( &SELECTION_TOOL::findMove, PCB_ACTIONS::findMove.MakeEvent() ); + Go( &SELECTION_TOOL::GetAndPlace, PCB_ACTIONS::getAndPlace.MakeEvent() ); Go( &SELECTION_TOOL::filterSelection, PCB_ACTIONS::filterSelection.MakeEvent() ); Go( &SELECTION_TOOL::selectConnection, PCB_ACTIONS::selectConnection.MakeEvent() ); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index a5a000e499..dc45907a9a 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -242,7 +242,7 @@ private: int find( const TOOL_EVENT& aEvent ); ///> Find an item and start moving. - int findMove( const TOOL_EVENT& aEvent ); + int GetAndPlace( const TOOL_EVENT& aEvent ); ///> Invoke filter dialog and modify current selection int filterSelection( const TOOL_EVENT& aEvent );