X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPipelineEditor%2FCanvas.cxx;h=90f1285e3801e3479aab7eba9efd4621b8f76c32;hb=733108d258a27799df875ceda2d84c3cafea64d3;hp=b8027d959d78b7014d2151143cd34c6e780239c2;hpb=1b79f6573aa3b01d97ca4f100ba9ee0c809a4243;p=cpPlugins.git diff --git a/lib/cpPipelineEditor/Canvas.cxx b/lib/cpPipelineEditor/Canvas.cxx index b8027d9..90f1285 100644 --- a/lib/cpPipelineEditor/Canvas.cxx +++ b/lib/cpPipelineEditor/Canvas.cxx @@ -132,9 +132,16 @@ dropEvent( QDropEvent* event ) QList< QTreeWidgetItem* > items = tree->selectedItems( ); for( auto iIt = items.begin( ); iIt != items.end( ); ++iIt ) - this->m_Editor->createFilter( - ( *iIt )->text( 0 ).toStdString( ), this->mapToScene( event->pos( ) ) - ); + { + auto parent = ( *iIt )->parent( ); + if( parent != NULL ) + this->m_Editor->createFilter( + parent->text( 0 ).toStdString( ), + ( *iIt )->text( 0 ).toStdString( ), + this->mapToScene( event->pos( ) ) + ); + + } // rof } // -------------------------------------------------------------------------