Commit 8a5fedb7 authored by Maciej Suminski's avatar Maciej Suminski

Code formatting and cleaning.

parent 7645ed86
......@@ -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 );
......
......@@ -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"
......
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