Skip to content

Commit

Permalink
BUG: Add a test if database is used when trying to pick one contour.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://orchestra.med.harvard.edu/svn/megason/Code/GoFigure2@2078 ef826fda-c0ae-4237-af8e-f8dcbcf7929c
  • Loading branch information
Arnaud Gelas committed Feb 4, 2010
1 parent 0d62bb0 commit 07bf34f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions trunk/GoFigure2Beta/Code/GUI/lib/QGoTabImageView3DwT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2083,26 +2083,30 @@ void
QGoTabImageView3DwT::
SelectContoursInTable( )
{
std::list< vtkProp3D* > listofpicked = m_ImageView->GetListOfPickedActors();
std::list< int > listofrowstobeselected;

std::list< vtkProp3D* >::iterator it = listofpicked.begin();

while( it != listofpicked.end() )
if( this->m_DataBaseTables->IsDatabaseUsed() )
{
// Change the corresponding highlighted value in the container
ContourMeshStructureMultiIndexContainer::nth_index< 1 >::type::iterator
actor_it = m_ContourMeshContainer.get< 1 >().find( static_cast< vtkActor* >( *it ) );
std::list< vtkProp3D* > listofpicked = m_ImageView->GetListOfPickedActors();
std::list< int > listofrowstobeselected;

if( actor_it != m_ContourMeshContainer.get< 1 >().end() )
std::list< vtkProp3D* >::iterator it = listofpicked.begin();

while( it != listofpicked.end() )
{
int trace_id = static_cast< int >( actor_it->TraceID );
listofrowstobeselected.push_back( trace_id );
// Change the corresponding highlighted value in the container
ContourMeshStructureMultiIndexContainer::nth_index< 1 >::type::iterator
actor_it = m_ContourMeshContainer.get< 1 >().find( static_cast< vtkActor* >( *it ) );

if( actor_it != m_ContourMeshContainer.get< 1 >().end() )
{
int trace_id = static_cast< int >( actor_it->TraceID );
listofrowstobeselected.push_back( trace_id );
}
++it;
}
++it;
}

this->m_DataBaseTables->ChangeContoursToHighLightInfoFromVisu( listofrowstobeselected,false );
this->m_DataBaseTables->ChangeContoursToHighLightInfoFromVisu(
listofrowstobeselected, false );
}
}
//-------------------------------------------------------------------------

Expand Down

0 comments on commit 07bf34f

Please sign in to comment.