Code formatting and cleaning.

This commit is contained in:
Maciej Suminski 2014-07-09 11:22:43 +02:00
parent 7645ed8601
commit 8a5fedb728
2 changed files with 19 additions and 19 deletions

View File

@ -1019,33 +1019,34 @@ void VIEW::UpdateItems()
m_needsUpdate.clear();
}
struct VIEW::extentsVisitor {
BOX2I extents;
bool first;
extentsVisitor()
{
first = true;
}
struct VIEW::extentsVisitor
{
BOX2I extents;
bool first;
extentsVisitor()
{
first = true;
}
bool operator()( VIEW_ITEM* aItem )
{
if( first )
extents = aItem->ViewBBox();
else
extents.Merge ( aItem->ViewBBox() );
return false;
}
};
bool operator()( VIEW_ITEM* aItem )
{
if( first )
extents = aItem->ViewBBox();
else
extents.Merge ( aItem->ViewBBox() );
return false;
}
};
const BOX2I VIEW::CalculateExtents()
{
extentsVisitor v;
BOX2I fullScene;
fullScene.SetMaximum();
BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers )
{
l->items->Query( fullScene, v );

View File

@ -29,7 +29,6 @@
#include <tool/tool_dispatcher.h>
#include <class_draw_panel_gal.h>
//#include <pcbnew_id.h>
#include "selection_tool.h"
#include "edit_tool.h"