X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2FPipelineEditor%2FPipelineEditor.cxx;h=2f7d7eabee3d7f4adf90e6a7fc8241dc7cf40901;hb=ddc5b66441101ed6584f4972ca0c4d13c588dacf;hp=9868abc7340bee0a894286470bc52a45a407ad18;hpb=f533290f40279617e54e19086dde7c0ba9b07f5b;p=cpPlugins.git diff --git a/appli/PipelineEditor/PipelineEditor.cxx b/appli/PipelineEditor/PipelineEditor.cxx index 9868abc..2f7d7ea 100644 --- a/appli/PipelineEditor/PipelineEditor.cxx +++ b/appli/PipelineEditor/PipelineEditor.cxx @@ -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(