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

This commit is contained in:
Maciej Suminski 2014-11-21 11:49:54 +01:00
parent 62e2537e73
commit 823623acb8
3 changed files with 22 additions and 22 deletions

View File

@ -233,7 +233,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent )
{
if( !m_editPoints ||
evt->Matches( m_selectionTool->ClearedEvent ) ||
evt->Matches( m_selectionTool->DeselectedEvent ) ||
evt->Matches( m_selectionTool->UnselectedEvent ) ||
evt->Matches( m_selectionTool->SelectedEvent ) )
{
break;
@ -783,7 +783,7 @@ void POINT_EDITOR::breakOutline( const VECTOR2I& aBreakPoint )
void POINT_EDITOR::setTransitions()
{
Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->SelectedEvent );
Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->DeselectedEvent );
Go( &POINT_EDITOR::OnSelectionChange, m_selectionTool->UnselectedEvent );
}

View File

@ -52,7 +52,7 @@
SELECTION_TOOL::SELECTION_TOOL() :
TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ),
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" ),
m_frame( NULL ), m_additive( false ), m_multiple( false ),
m_editModules( false ), m_locked( true )
@ -221,11 +221,11 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem )
{
if( aItem->IsSelected() )
{
deselect( aItem );
unselect( aItem );
// Inform other potentially interested tools
TOOL_EVENT deselectEvent( DeselectedEvent );
m_toolMgr->ProcessEvent( deselectEvent );
TOOL_EVENT unselectEvent( UnselectedEvent );
m_toolMgr->ProcessEvent( unselectEvent );
}
else
{
@ -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
// 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 )
{
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 );
if( itemIdx >= 0 )
@ -757,8 +757,8 @@ void SELECTION_TOOL::deselect( BOARD_ITEM* aItem )
}
// Inform other potentially interested tools
TOOL_EVENT deselected( DeselectedEvent );
m_toolMgr->ProcessEvent( deselected );
TOOL_EVENT unselected( UnselectedEvent );
m_toolMgr->ProcessEvent( unselected );
}
@ -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 );

View File

@ -160,8 +160,8 @@ public:
///> Event sent after an item is selected.
const TOOL_EVENT SelectedEvent;
///> Event sent after an item is deselected.
const TOOL_EVENT DeselectedEvent;
///> Event sent after an item is unselected.
const TOOL_EVENT UnselectedEvent;
///> Event sent after selection is cleared.
const TOOL_EVENT ClearedEvent;
@ -247,26 +247,26 @@ private:
void select( BOARD_ITEM* aItem );
/**
* Function deselectItem()
* Takes necessary action mark an item as deselected.
* Function unselectItem()
* 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.
* @param aItem is an item to be be marked.
*/
void selectVisually( BOARD_ITEM* aItem ) const;
/**
* Function deselectVisually()
* Function unselectVisually()
* Marks item as selected, but does not add it to the ITEMS_PICKED_LIST.
* @param aItem is an item to be be marked.
*/
void deselectVisually( BOARD_ITEM* aItem ) const;
void unselectVisually( BOARD_ITEM* aItem ) const;
/**
* Function containsSelected()