From 82ca611ed32b5d6a4e396ceaa9c406b553945d80 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 11:37:54 +0100 Subject: [PATCH] SELECTION_TOOL::SELECTION::Clear made private, as there was no chance to call it outside the SELECTION_TOOL class. --- pcbnew/tools/selection_tool.cpp | 8 ++++---- pcbnew/tools/selection_tool.h | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index f226709a86..9cdd5fc072 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -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()->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(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 168f2288da..93b25083c6 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -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()