// -------------------------------------------------------------------------
cpPlugins::Interface::Workspace::
TFilter* cpPlugins::Interface::Workspace::
-CreateFilter( const std::string& category, const std::string& filter )
+CreateFilter(
+ const std::string& category, const std::string& filter,
+ const std::string& name
+ )
{
typedef cpPlugins::Pipeline::Widget _TWidget;
if( o.IsNotNull( ) )
{
// Choose a name
- std::string name = filter;
- while( this->GetFilter( name ) != NULL )
- name += std::string( "_" );
+ std::string real_name = name;
+ while( this->GetFilter( real_name ) != NULL )
+ real_name += std::string( "_" );
o->SetPrintExecution( this->m_PrintExecution );
- o->SetName( name );
+ o->SetName( real_name );
// Interactors
for(
o->AddInteractor( *i );
// Finish association
- this->m_Filters[ name ] = o;
+ this->m_Filters[ real_name ] = o;
} // fi
return( o.GetPointer( ) );
}
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Workspace::
+TFilter* cpPlugins::Interface::Workspace::
+CreateFilter( const std::string& category, const std::string& filter )
+{
+ return( this->CreateFilter( category, filter, filter ) );
+}
+
// -------------------------------------------------------------------------
bool cpPlugins::Interface::Workspace::
RenameFilter( const std::string& old_name, const std::string& new_name )