]> Creatis software - cpPlugins.git/blobdiff - lib/cpPipelineEditor/Canvas.cxx
...
[cpPlugins.git] / lib / cpPipelineEditor / Canvas.cxx
index b8027d959d78b7014d2151143cd34c6e780239c2..90f1285e3801e3479aab7eba9efd4621b8f76c32 100644 (file)
@@ -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
 }
 
 // -------------------------------------------------------------------------