]> Creatis software - cpPlugins.git/blobdiff - appli/cpPipelineEditor/QNodesEditor.cxx
More on graph editor
[cpPlugins.git] / appli / cpPipelineEditor / QNodesEditor.cxx
index a499e94308c6339660ffbf26c4e11b9c0f50fc53..6417636e44ff256c6d30cbee0ce3786b5814e228 100644 (file)
@@ -76,8 +76,6 @@ workspace( ) const
 void PipelineEditor::QNodesEditor::\r
 setWorkspace( TWorkspace* ws )\r
 {\r
-  if( this->m_Workspace == ws )\r
-    return;\r
   this->m_Workspace = ws;\r
   this->m_Graph = TGraph::New( );\r
 \r
@@ -184,8 +182,6 @@ itemAt( const QPointF& pos )
   return( NULL );\r
 }\r
 \r
-#include <iostream>\r
-\r
 // -------------------------------------------------------------------------\r
 void PipelineEditor::QNodesEditor::\r
 _CreateBlock( TFilter* f, const QPointF& pnt )\r
@@ -196,7 +192,7 @@ _CreateBlock( TFilter* f, const QPointF& pnt )
   // Add block\r
   QNEBlock* b = new QNEBlock( 0, this->m_Scene );\r
   b->setNamePort( f->GetName( ) );\r
-  b->setTypePort( f->GetClassName( ).c_str( ) );\r
+  b->setTypePort( f->GetClassName( ) );\r
   // TODO: b->setScenePos( pnt );\r
 \r
   // Add input ports\r
@@ -212,7 +208,7 @@ _CreateBlock( TFilter* f, const QPointF& pnt )
     b->addOutputPort( oIt->c_str( ) );\r
 \r
   // Keep a trace of this visual graph\r
-  this->m_Graph->InsertVertex( f->GetName( ), b );\r
+  this->m_Graph->SetVertex( f->GetName( ), b );\r
 }\r
 \r
 // -------------------------------------------------------------------------\r