{
std::string parent = this->m_Plugins.GetParent( *oIt );
TDataObject* dobj = this->m_Plugins.GetData< TDataObject >( *oIt );
- this->m_UI->MPR->AddData( dobj, *oIt, parent );
- this->m_UI->MPR->ShowData( *oIt );
+ if( this->m_UI->MPR->AddData( dobj, *oIt, parent ) )
+ this->m_UI->MPR->ShowData( *oIt );
} // rof
-
- /* TODO
- std::vector< std::string > outputs;
- std::string err = this->m_Plugins->UpdateActiveFilter( outputs );
- if( err == "" )
- {
- for( auto oIt = outputs.begin( ); oIt != outputs.end( ); ++oIt )
- {
- TPlugins::TImage* image = this->m_Plugins->GetImage( *oIt );
- if( image != NULL )
- {
- vtkImageData* vimage = image->GetVTK< vtkImageData >( );
- if( vimage != NULL )
- {
- this->m_UI->MPR->AddImage(
- vimage, *oIt, this->m_Plugins->GetParent( *oIt )
- );
- this->m_UI->MPR->ShowData( *oIt );
-
- } // fi
- continue;
-
- } // fi
-
- TPlugins::TMesh* mesh = this->m_Plugins->GetMesh( *oIt );
- if( mesh != NULL )
- {
- this->m_Plugins->BlockWidget( );
- this->m_UI->MPR->AddMesh(
- mesh->GetVTK< vtkPolyData >( ),
- *oIt,
- this->m_Plugins->GetParent( *oIt )
- );
- this->m_UI->MPR->ShowData( *oIt );
- this->m_Plugins->UnblockWidget( );
-
- } // fi
-
- } // rof
- }
- else
- {
- QMessageBox::critical(
- this,
- tr( "Error executing filter" ),
- tr( ( std::string( "Error caught: " ) + err ).c_str( ) )
- );
- return;
-
- } // fi
- */
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::Plugins::
DeactivateFilter( )
{
+ if( this->m_ActiveFilter.IsNotNull( ) )
+ this->m_ActiveFilter->DisconnectOutputs( );
this->m_ActiveFilter = NULL;
}
outputs.insert( dobj->GetName( ) );
} // rof
- this->m_ActiveFilter->DisconnectOutputs( );
+ // this->m_ActiveFilter->DisconnectOutputs( );
return( true );
}
else