Commit 61b05cea authored by schurade's avatar schurade
Browse files

[FIX] roi not disappearing in the 3d scene when deleted

parent eb2605f8
......@@ -63,6 +63,11 @@ WRMROIRepresentation::~WRMROIRepresentation()
WGraphicsEngine::getGraphicsEngine()->getScene()->remove( m_roi );
}
void WRMROIRepresentation::removeFromGE()
{
WGraphicsEngine::getGraphicsEngine()->getScene()->remove( m_roi );
}
osg::ref_ptr< WROI > WRMROIRepresentation::getROI()
{
return m_roi;
......
......@@ -112,6 +112,12 @@ public:
*/
bool isActive();
/**
* removes the graphical representation from the graphics engine
* this a workaround for a remove issue
*/
void removeFromGE();
protected:
/**
* slot gets called when a property has changed
......
......@@ -95,6 +95,8 @@ void WROIManagerFibers::removeRoi( boost::shared_ptr< WRMROIRepresentation > roi
return;
m_recalcLock = true;
roi->removeFromGE();
for ( std::list< boost::shared_ptr< WRMBranch > >::iterator iter = m_branches.begin(); iter != m_branches.end(); ++iter )
{
( *iter )->removeRoi( roi );
......
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