Commit f22893b3 authored by Frédéric Larue's avatar Frédéric Larue

Bug fixed in processSelection() function using a list of selection processors.

parent a377297e
......@@ -1323,7 +1323,7 @@ void GLViewer::processSelection( BaseSelectionProcessor &proc )
void GLViewer::processSelection( QList<BaseSelectionProcessor*> &procList )
{
QMap< QString, BaseSelectionProcessor* > processorByType;
QMap< QString, QList<BaseSelectionProcessor*> > processorByType;
for( BaseSelectionProcessor* p : procList )
{
......@@ -1331,14 +1331,15 @@ void GLViewer::processSelection( QList<BaseSelectionProcessor*> &procList )
p->acceptedDataType( acceptedTypes );
for( QString& type : acceptedTypes )
processorByType[type] = p;
processorByType[type].push_back( p );
}
for( auto& d : m_Displayables )
{
QMap< QString, BaseSelectionProcessor* >::iterator processorFound = processorByType.find( d.first->GetTypeString() );
auto processorFound = processorByType.find( d.first->GetTypeString() );
if( processorFound != processorByType.end() )
processSelection( d.second, *processorFound.value() );
for( auto p : processorFound.value() )
processSelection( d.second, *p );
}
}
......
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