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

Code formatting and cleaning.

parent 7645ed86
...@@ -1019,33 +1019,34 @@ void VIEW::UpdateItems() ...@@ -1019,33 +1019,34 @@ void VIEW::UpdateItems()
m_needsUpdate.clear(); m_needsUpdate.clear();
} }
struct VIEW::extentsVisitor {
BOX2I extents;
bool first;
extentsVisitor() struct VIEW::extentsVisitor
{ {
first = true; 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() const BOX2I VIEW::CalculateExtents()
{ {
extentsVisitor v; extentsVisitor v;
BOX2I fullScene; BOX2I fullScene;
fullScene.SetMaximum(); fullScene.SetMaximum();
BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers )
{ {
l->items->Query( fullScene, v ); l->items->Query( fullScene, v );
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <tool/tool_dispatcher.h> #include <tool/tool_dispatcher.h>
#include <class_draw_panel_gal.h> #include <class_draw_panel_gal.h>
//#include <pcbnew_id.h>
#include "selection_tool.h" #include "selection_tool.h"
#include "edit_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