SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class.

This commit is contained in:
Maciej Suminski 2014-02-04 11:37:54 +01:00
parent b317894ea0
commit 82ca611ed3
2 changed files with 8 additions and 5 deletions

View File

@ -69,7 +69,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason )
if( aReason == TOOL_BASE::MODEL_RELOAD )
// Remove pointers to the selected items from containers
// without changing their properties (as they are already deleted)
m_selection.Clear();
m_selection.clear();
else
// Restore previous properties of selected items and remove them from containers
ClearSelection();
@ -172,7 +172,7 @@ void SELECTION_TOOL::ClearSelection()
item->ViewSetVisible( true );
item->ClearSelected();
}
m_selection.Clear();
m_selection.clear();
getEditFrame<PCB_EDIT_FRAME>()->SetCurItem( NULL );
@ -465,7 +465,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) )
return true;
if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsLayerVisible( MOD_BK_VISIBLE ) )
if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsElementVisible( MOD_BK_VISIBLE ) )
return true;
return false;
@ -590,7 +590,7 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const
}
void SELECTION_TOOL::SELECTION::Clear()
void SELECTION_TOOL::SELECTION::clear()
{
items.ClearItemsList();
group->Clear();

View File

@ -78,9 +78,12 @@ public:
return items.GetCount();
}
private:
/// Clears both the VIEW_GROUP and set of selected items. Please note that it does not
/// change properties of selected items (e.g. selection flag).
void Clear();
void clear();
friend class SELECTION_TOOL;
};
/// @copydoc TOOL_INTERACTIVE::Reset()