Commit 2e5f226a authored by schurade's avatar schurade
Browse files

[ADD] active rois can now be hidden

parent 4af81fc2
......@@ -43,6 +43,8 @@ void WROI::properties()
m_active = m_properties->addProperty( "active", "description", true, boost::bind( &WROI::propertyChanged, this ) );
m_active->setHidden( true );
m_show = m_properties->addProperty( "show", "Toggles visibility of the roi", true, boost::bind( &WROI::propertyChanged, this ) );
m_dirty = m_properties->addProperty( "Dirty", "description", true, boost::bind( &WROI::propertyChanged, this ) );
m_dirty->setHidden( true );
......@@ -51,6 +53,18 @@ void WROI::properties()
void WROI::propertyChanged()
{
if ( m_show->changed() )
{
if ( m_show->get( true ) )
{
unhide();
}
else
{
hide();
}
}
setDirty();
}
......@@ -118,4 +132,3 @@ void WROI::addChangeNotifier( boost::function< void() > notifier )
m_changeNotifiers.push_back( notifier );
lock.unlock();
}
......@@ -115,7 +115,6 @@ public:
*/
void addChangeNotifier( boost::function< void() > notifier );
protected:
/**
* initializes the roi's properties
......@@ -150,6 +149,11 @@ protected:
*/
WPropBool m_active;
/**
* indicates if the roi is visible in the scene
*/
WPropBool m_show;
/**
* indicates if the roi is negated
*/
......
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