Code formatting and clean-up

This commit is contained in:
Maciej Suminski 2017-04-20 11:44:58 +02:00
parent 13b2cb4d16
commit 74847bf8ff
4 changed files with 7 additions and 14 deletions

View File

@ -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()
{
}

View File

@ -133,9 +133,6 @@ protected:
protected:
/// Container for storing VIEW_ITEMs
ITEMS m_groupItems;
private:
void updateBbox();
};
} // namespace KIGFX

View File

@ -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<BOARD_ITEM*>( item )->Move( translation );
static_cast<BOARD_ITEM*>( item )->Rotate( rotPoint, rotation );

View File

@ -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<VIEW_ITEM*> items;