Commit 823623ac authored by Maciej Suminski's avatar Maciej Suminski

selection_tool: Renamed deselect* to unselect* for naming consistency.

parent 62e2537e
...@@ -233,7 +233,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent ) ...@@ -233,7 +233,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent )
{ {
if( !m_editPoints || if( !m_editPoints ||
evt->Matches( m_selectionTool->ClearedEvent ) || evt->Matches( m_selectionTool->ClearedEvent ) ||
evt->Matches( m_selectionTool->DeselectedEvent ) || evt->Matches( m_selectionTool->UnselectedEvent ) ||
evt->Matches( m_selectionTool->SelectedEvent ) ) evt->Matches( m_selectionTool->SelectedEvent ) )
{ {
break; break;
...@@ -783,7 +783,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint ) ...@@ -783,7 +783,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint )
void POINT_EDITOR::setTransitions() void POINT_EDITOR::setTransitions()
{ {
Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->SelectedEvent ); Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->SelectedEvent );
Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->DeselectedEvent ); Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->UnselectedEvent );
} }
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
SELECTION_TOOL::SELECTION_TOOL() : SELECTION_TOOL::SELECTION_TOOL() :
TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ),
SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ), SelectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.selected" ),
DeselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.deselected" ), UnselectedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.unselected" ),
ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ), ClearedEvent( TC_MESSAGE, TA_ACTION, "pcbnew.InteractiveSelection.cleared" ),
m_frame( NULL ), m_additive( false ), m_multiple( false ), m_frame( NULL ), m_additive( false ), m_multiple( false ),
m_editModules( false ), m_locked( true ) m_editModules( false ), m_locked( true )
...@@ -221,11 +221,11 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) ...@@ -221,11 +221,11 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem )
{ {
if( aItem->IsSelected() ) if( aItem->IsSelected() )
{ {
deselect( aItem ); unselect( aItem );
// Inform other potentially interested tools // Inform other potentially interested tools
TOOL_EVENT deselectEvent( DeselectedEvent ); TOOL_EVENT unselectEvent( UnselectedEvent );
m_toolMgr->ProcessEvent( deselectEvent ); m_toolMgr->ProcessEvent( unselectEvent );
} }
else else
{ {
...@@ -734,17 +734,17 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem ) ...@@ -734,17 +734,17 @@ void SELECTION_TOOL::select( BOARD_ITEM* aItem )
} }
void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) void SELECTION_TOOL::unselect( BOARD_ITEM* aItem )
{ {
// Modules are treated in a special way - when they are selected, we have to // Modules are treated in a special way - when they are selected, we have to
// deselect all the parts that make the module, not the module itself // unselect all the parts that make the module, not the module itself
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( boost::bind( &SELECTION_TOOL::deselectVisually, this, _1 ) ); module->RunOnChildren( boost::bind( &SELECTION_TOOL::unselectVisually, this, _1 ) );
} }
deselectVisually( aItem ); unselectVisually( aItem );
int itemIdx = m_selection.items.FindItem( aItem ); int itemIdx = m_selection.items.FindItem( aItem );
if( itemIdx >= 0 ) if( itemIdx >= 0 )
...@@ -757,8 +757,8 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem ) ...@@ -757,8 +757,8 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem )
} }
// Inform other potentially interested tools // Inform other potentially interested tools
TOOL_EVENT deselected( DeselectedEvent ); TOOL_EVENT unselected( UnselectedEvent );
m_toolMgr->ProcessEvent( deselected ); m_toolMgr->ProcessEvent( unselected );
} }
...@@ -772,7 +772,7 @@ void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) const ...@@ -772,7 +772,7 @@ void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) const
} }
void SELECTION_TOOL::deselectVisually( BOARD_ITEM* aItem ) const void SELECTION_TOOL::unselectVisually( BOARD_ITEM* aItem ) const
{ {
m_selection.group->Remove( aItem ); m_selection.group->Remove( aItem );
......
...@@ -160,8 +160,8 @@ public: ...@@ -160,8 +160,8 @@ public:
///> Event sent after an item is selected. ///> Event sent after an item is selected.
const TOOL_EVENT SelectedEvent; const TOOL_EVENT SelectedEvent;
///> Event sent after an item is deselected. ///> Event sent after an item is unselected.
const TOOL_EVENT DeselectedEvent; const TOOL_EVENT UnselectedEvent;
///> Event sent after selection is cleared. ///> Event sent after selection is cleared.
const TOOL_EVENT ClearedEvent; const TOOL_EVENT ClearedEvent;
...@@ -247,26 +247,26 @@ private: ...@@ -247,26 +247,26 @@ private:
void select( BOARD_ITEM* aItem ); void select( BOARD_ITEM* aItem );
/** /**
* Function deselectItem() * Function unselectItem()
* Takes necessary action mark an item as deselected. * Takes necessary action mark an item as unselected.
* *
* @param aItem is an item to be deselected. * @param aItem is an item to be unselected.
*/ */
void deselect( BOARD_ITEM* aItem ); void unselect( BOARD_ITEM* aItem );
/** /**
* Function deselectVisually() * Function unselectVisually()
* Marks item as selected, but does not add it to the ITEMS_PICKED_LIST. * Marks item as selected, but does not add it to the ITEMS_PICKED_LIST.
* @param aItem is an item to be be marked. * @param aItem is an item to be be marked.
*/ */
void selectVisually( BOARD_ITEM* aItem ) const; void selectVisually( BOARD_ITEM* aItem ) const;
/** /**
* Function deselectVisually() * Function unselectVisually()
* Marks item as selected, but does not add it to the ITEMS_PICKED_LIST. * Marks item as selected, but does not add it to the ITEMS_PICKED_LIST.
* @param aItem is an item to be be marked. * @param aItem is an item to be be marked.
*/ */
void deselectVisually( BOARD_ITEM* aItem ) const; void unselectVisually( BOARD_ITEM* aItem ) const;
/** /**
* Function containsSelected() * Function containsSelected()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment