Commit 31f5a198 authored by Frédéric Larue's avatar Frédéric Larue

GLViewer::frameItems() function code simplified.

parent ce1044a7
......@@ -527,16 +527,12 @@ void GLViewer::frameItems( QList<GenericUIData*> &items )
{
Box3f box;
for( auto m=items.begin(); m!=items.end(); ++m )
for( auto m : items )
{
DisplayableMap::iterator dispInfo = m_Displayables.find( *m );
if( dispInfo != m_Displayables.end() )
if( !dispInfo->second.boundingBox.IsNull() )
{
Box3f::CornerSet objectBoxCorners = dispInfo->second.boundingBox.Corners();
for( auto c=objectBoxCorners.begin(); c!=objectBoxCorners.end(); ++c )
box.Add( dispInfo->second.GetTransform().map(*c) );
}
DisplayableMap::iterator dispInfo = m_Displayables.find( m );
if( dispInfo != m_Displayables.end() && !dispInfo->second.boundingBox.IsNull() )
for( auto &c : dispInfo->second.boundingBox.Corners() )
box.Add( dispInfo->second.GetTransform().map(c) );
}
frameBox( box );
......
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