From 74847bf8ff565cb37f135a14b109c224f3b7f7d1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 20 Apr 2017 11:44:58 +0200 Subject: [PATCH] Code formatting and clean-up --- common/view/view_group.cpp | 14 +++++--------- include/view/view_group.h | 3 --- pcbnew/tools/edit_tool.cpp | 2 -- pcbnew/tools/selection_tool.cpp | 2 ++ 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index ba87fe9e59..f2a024a5ae 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -60,11 +60,11 @@ void VIEW_GROUP::Add( VIEW_ITEM* aItem ) void VIEW_GROUP::Remove( VIEW_ITEM* aItem ) { - for( auto iter = m_groupItems.begin(); iter != m_groupItems.end(); ++iter) + for( auto iter = m_groupItems.begin(); iter != m_groupItems.end(); ++iter ) { if( aItem == *iter ) { - m_groupItems.erase( iter); + m_groupItems.erase( iter ); break; } } @@ -82,11 +82,13 @@ unsigned int VIEW_GROUP::GetSize() const return m_groupItems.size(); } -VIEW_ITEM *VIEW_GROUP::GetItem(unsigned int idx) const + +VIEW_ITEM *VIEW_GROUP::GetItem( unsigned int idx ) const { return m_groupItems[idx]; } + const BOX2I VIEW_GROUP::ViewBBox() const { BOX2I maxBox; @@ -163,9 +165,3 @@ void VIEW_GROUP::ItemsViewUpdate( VIEW_ITEM::VIEW_UPDATE_FLAGS aFlags ) for(unsigned int i = 0 ; i < GetSize(); i++) GetItem(i)->ViewUpdate( aFlags ); }*/ - - -void VIEW_GROUP::updateBbox() -{ - -} diff --git a/include/view/view_group.h b/include/view/view_group.h index fb98412ee6..ebc88aba58 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -133,9 +133,6 @@ protected: protected: /// Container for storing VIEW_ITEMs ITEMS m_groupItems; - -private: - void updateBbox(); }; } // namespace KIGFX diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 2021c09f86..50c7ee292f 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -143,7 +143,6 @@ TOOL_ACTION PCB_ACTIONS::exchangeFootprints( "pcbnew.InteractiveEdit.ExchangeFoo _( "Exchange Footprint(s)" ), _( "Change the footprint used for modules" ), import_module_xpm ); - TOOL_ACTION PCB_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_EDIT_ITEM ), _( "Properties..." ), _( "Displays item properties dialog" ), editor_xpm ); @@ -736,7 +735,6 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent ) for( auto item : selection ) { - m_commit->Modify( item ); static_cast( item )->Move( translation ); static_cast( item )->Rotate( rotPoint, rotation ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 37d29681df..f8ae898a93 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1836,6 +1836,7 @@ VECTOR2I SELECTION::GetCenter() const return centre; } + const BOX2I SELECTION::ViewBBox() const { EDA_RECT eda_bbox; @@ -1859,6 +1860,7 @@ const BOX2I SELECTION::ViewBBox() const return BOX2I( eda_bbox.GetOrigin(), eda_bbox.GetSize() ); } + const KIGFX::VIEW_GROUP::ITEMS SELECTION::updateDrawList() const { std::vector items;