Commit 82ca611e authored by Maciej Suminski's avatar Maciej Suminski

SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call...

SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class.
parent b317894e
...@@ -69,7 +69,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason ) ...@@ -69,7 +69,7 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason )
if( aReason == TOOL_BASE::MODEL_RELOAD ) if( aReason == TOOL_BASE::MODEL_RELOAD )
// Remove pointers to the selected items from containers // Remove pointers to the selected items from containers
// without changing their properties (as they are already deleted) // without changing their properties (as they are already deleted)
m_selection.Clear(); m_selection.clear();
else else
// Restore previous properties of selected items and remove them from containers // Restore previous properties of selected items and remove them from containers
ClearSelection(); ClearSelection();
...@@ -172,7 +172,7 @@ void SELECTION_TOOL::ClearSelection() ...@@ -172,7 +172,7 @@ void SELECTION_TOOL::ClearSelection()
item->ViewSetVisible( true ); item->ViewSetVisible( true );
item->ClearSelected(); item->ClearSelected();
} }
m_selection.Clear(); m_selection.clear();
getEditFrame<PCB_EDIT_FRAME>()->SetCurItem( NULL ); getEditFrame<PCB_EDIT_FRAME>()->SetCurItem( NULL );
...@@ -465,7 +465,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const ...@@ -465,7 +465,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const
if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) ) if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsElementVisible( MOD_FR_VISIBLE ) )
return true; 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 true;
return false; return false;
...@@ -590,7 +590,7 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const ...@@ -590,7 +590,7 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const
} }
void SELECTION_TOOL::SELECTION::Clear() void SELECTION_TOOL::SELECTION::clear()
{ {
items.ClearItemsList(); items.ClearItemsList();
group->Clear(); group->Clear();
......
...@@ -78,9 +78,12 @@ public: ...@@ -78,9 +78,12 @@ public:
return items.GetCount(); return items.GetCount();
} }
private:
/// Clears both the VIEW_GROUP and set of selected items. Please note that it does not /// 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). /// change properties of selected items (e.g. selection flag).
void Clear(); void clear();
friend class SELECTION_TOOL;
}; };
/// @copydoc TOOL_INTERACTIVE::Reset() /// @copydoc TOOL_INTERACTIVE::Reset()
......
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