X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPipelineEditor%2FEditor.cxx;h=319edb540c7aa6de4e63aed36809d83d1eea17f7;hb=e2fb8817731f6231d34941a208e46b36dad425b2;hp=8388eddb123b3cbff209ed47542acab7ab7c67d4;hpb=bf4172934768034696b1c4b993b7e92e3808e083;p=cpPlugins.git diff --git a/lib/cpPipelineEditor/Editor.cxx b/lib/cpPipelineEditor/Editor.cxx index 8388edd..319edb5 100644 --- a/lib/cpPipelineEditor/Editor.cxx +++ b/lib/cpPipelineEditor/Editor.cxx @@ -119,12 +119,16 @@ setWorkspace( TWorkspace* ws ) // ------------------------------------------------------------------------- std::string cpPipelineEditor::Editor:: -createFilter( const std::string& filter, const QPointF& pnt ) +createFilter( + const std::string& category, + const std::string& filter, + const QPointF& pnt + ) { std::string name = filter; while( this->m_Workspace->HasFilter( name ) ) name += std::string( "_" ); - if( this->m_Workspace->CreateFilter( filter, name ) ) + if( this->m_Workspace->CreateFilter( category, filter, name ) ) { auto b = this->_createBlock( this->m_Workspace->GetFilter( name ), @@ -358,15 +362,11 @@ cpPipelineEditor_Editor_Callback_CODE( MouseDoubleClick ) old_name.toStdString( ), new_name.toStdString( ) ); - if( ok ) - { - block->setNamePort( new_name ); - this->m_Workspace->RenameFilter( - old_name.toStdString( ), - new_name.toStdString( ) - ); - - } // fi + block->setNamePort( new_name ); + this->m_Workspace->RenameFilter( + old_name.toStdString( ), + new_name.toStdString( ) + ); } // fi }