Commit fde09285 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[CHANGE] making the active flag work again in fiberdisplay module

parent b215ac1a
......@@ -161,11 +161,22 @@ void WMFiberDisplay::connectors()
WModule::connectors(); // call WModules initialization
}
void WMFiberDisplay::activate()
{
if( m_active->get() )
{
m_osgNode->setNodeMask( 0xFFFFFFFF );
}
else
{
m_osgNode->setNodeMask( 0x0 );
}
}
void WMFiberDisplay::properties()
{
m_properties->addString( "Fibers Display Module", "Display fibers" );
// this bool is hidden
m_properties->addBool( "active", true, true )->connect( boost::bind( &WMFiberDisplay::slotPropertyChanged, this, _1 ) );
m_properties->addBool( "Local Color", false )->connect( boost::bind( &WMFiberDisplay::slotPropertyChanged, this, _1 ) );
m_properties->addBool( "Use Tubes", false )->connect( boost::bind( &WMFiberDisplay::slotPropertyChanged, this, _1 ) );
}
......@@ -191,18 +202,7 @@ void WMFiberDisplay::toggleTubes()
void WMFiberDisplay::slotPropertyChanged( std::string propertyName )
{
if( propertyName == "active" )
{
if ( m_properties->getValue< bool >( propertyName ) )
{
m_osgNode->setNodeMask( 0xFFFFFFFF );
}
else
{
m_osgNode->setNodeMask( 0x0 );
}
}
else if ( propertyName == "Local Color" )
if ( propertyName == "Local Color" )
{
updateColoring();
}
......
......@@ -89,6 +89,11 @@ public:
protected:
/**
* Callback for m_active. Overwrite this in your modules to handle m_active changes separately.
*/
virtual void activate();
/**
* Entry point after loading the module. Runs in separate thread.
*/
virtual void moduleMain();
......@@ -119,6 +124,8 @@ protected:
*/
void updateColoring();
WPropBool m_localColor;
private:
/**
* Input connector for a fiber dataset.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment