]> Creatis software - cpPlugins.git/blobdiff - appli/PipelineEditor/PipelineEditor.cxx
...
[cpPlugins.git] / appli / PipelineEditor / PipelineEditor.cxx
index 9868abc7340bee0a894286470bc52a45a407ad18..2f7d7eabee3d7f4adf90e6a7fc8241dc7cf40901 100644 (file)
@@ -66,10 +66,15 @@ PipelineEditor( int argc, char* argv[], QApplication* app, QWidget* parent )
       this->m_PluginsPath = info.canonicalPath( ).toStdString( );
       this->_LoadPluginsFromPath( this->m_PluginsPath );
     }
-    else
+    /*
+      else
       this->_UpdateLoadedPlugins( );
+    */
 
   } // fi
+  QDir exec_dir( "." );
+  if( exec_dir.exists( ) )
+    this->_LoadPluginsFromPath( exec_dir.canonicalPath( ).toStdString( ) );
 
   /* TODO
      this->m_Interface = new cpPlugins::Interface( );
@@ -135,14 +140,16 @@ _LoadPluginsFromPath( const std::string& path )
   {
     try
     {
-      this->m_Interface.LoadPluginFile( fIt->toStdString( ) );
+      this->m_Interface.LoadPluginFile(
+        ( dir.absolutePath( ) + QDir::separator( ) + *fIt ).toStdString( )
+        );
     }
-    catch( ... )
+    catch( std::exception& err )
     {
       // Just ignore un-loadable libraries
-    }
+    } // yrt
 
-  } // yrt
+  } // rof
   this->_UpdateLoadedPlugins( );
 }
 
@@ -159,6 +166,7 @@ _UpdateLoadedPlugins( )
       "Error loading default plugins",
       "No plugins loaded: remember to load some!!!"
       );
+    this->_UnBlock( );
     return;
 
   } // fi
@@ -422,6 +430,14 @@ _ShowFilterOutput(
       }
       else if( mdata != NULL )
       {
+        if( this->m_UI->Viewer->AddData( mdata, data_name ) )
+        {
+          this->m_UI->Viewer->SetDataColor( data_name, 1, 0, 0 );
+          this->_Block( );
+          this->m_UI->Viewer->ShowData( data_name );
+          this->_UnBlock( );
+
+        } // fi
       }
       else
         QMessageBox::critical(