Commit a55a2515 authored by schurade's avatar schurade

[FIX #405] ArbitraryPlaneModule does nut update if moving a non center point in the beginning

parent 2081ad51
...@@ -45,7 +45,7 @@ void WROI::properties() ...@@ -45,7 +45,7 @@ void WROI::properties()
m_show = m_properties->addProperty( "show", "Toggles visibility of the roi", true, boost::bind( &WROI::propertyChanged, this ) ); 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 = m_properties->addProperty( "Dirty", "description", true ); // boost::bind( &WROI::propertyChanged, this ) );
m_dirty->setHidden( true ); m_dirty->setHidden( true );
m_not = m_properties->addProperty( "NOT", "description", false, boost::bind( &WROI::propertyChanged, this ) ); m_not = m_properties->addProperty( "NOT", "description", false, boost::bind( &WROI::propertyChanged, this ) );
......
...@@ -126,12 +126,13 @@ protected: ...@@ -126,12 +126,13 @@ protected:
*/ */
void propertyChanged(); void propertyChanged();
osg::ref_ptr< WPickHandler > m_pickHandler; //!< A pointer to the pick handler used to get gui events for moving the box.
/** /**
* boost signal object to indicate box manipulation * signals a roi change to all subscribers
*/ */
boost::signals2::signal0< void >m_signalIsModified; void signalRoiChange();
osg::ref_ptr< WPickHandler > m_pickHandler; //!< A pointer to the pick handler used to get gui events for moving the box.
/** /**
* the property object for the module * the property object for the module
...@@ -180,11 +181,6 @@ protected: ...@@ -180,11 +181,6 @@ protected:
boost::shared_mutex m_associatedNotifiersLock; boost::shared_mutex m_associatedNotifiersLock;
private: private:
/**
* signals a roi change to all subscribers
*/
void signalRoiChange();
/** /**
* updates the graphics * updates the graphics
*/ */
......
...@@ -298,7 +298,7 @@ void WROIBox::updateGFX() ...@@ -298,7 +298,7 @@ void WROIBox::updateGFX()
setDirty(); setDirty();
m_isPicked = true; m_isPicked = true;
m_signalIsModified(); signalRoiChange();
} }
if ( m_isPicked && m_pickInfo.getName() == "unpick" ) if ( m_isPicked && m_pickInfo.getName() == "unpick" )
{ {
......
...@@ -108,6 +108,7 @@ void WROISphere::updateGFX() ...@@ -108,6 +108,7 @@ void WROISphere::updateGFX()
{ {
std::stringstream ss; std::stringstream ss;
ss << "ROISphere" << sphereId << ""; ss << "ROISphere" << sphereId << "";
if ( m_pickInfo.getName() == ss.str() ) if ( m_pickInfo.getName() == ss.str() )
{ {
std::pair< float, float > newPixelPos( m_pickInfo.getPickPixelPosition() ); std::pair< float, float > newPixelPos( m_pickInfo.getPickPixelPosition() );
...@@ -143,8 +144,6 @@ void WROISphere::updateGFX() ...@@ -143,8 +144,6 @@ void WROISphere::updateGFX()
m_oldPixelPosition = newPixelPos; m_oldPixelPosition = newPixelPos;
m_dirty->set( true ); m_dirty->set( true );
m_isPicked = true; m_isPicked = true;
m_signalIsModified();
} }
if ( m_isPicked && m_pickInfo.getName() == "unpick" ) if ( m_isPicked && m_pickInfo.getName() == "unpick" )
{ {
...@@ -156,6 +155,8 @@ void WROISphere::updateGFX() ...@@ -156,6 +155,8 @@ void WROISphere::updateGFX()
if ( m_dirty->get() ) if ( m_dirty->get() )
{ {
redrawSphere(); redrawSphere();
signalRoiChange();
m_dirty->set( false );
} }
} }
......
...@@ -136,14 +136,20 @@ void WMArbitraryPlane::moduleMain() ...@@ -136,14 +136,20 @@ void WMArbitraryPlane::moduleMain()
{ {
m_moduleState.wait(); m_moduleState.wait();
if ( m_shutdownFlag() )
{
break;
}
if ( m_showComplete->changed() ) if ( m_showComplete->changed() )
{ {
m_showComplete->get( true );
m_dirty = true; m_dirty = true;
} }
if ( m_active->changed() ) if ( m_active->changed() )
{ {
if ( m_active->get() && m_showManipulators->get() ) if ( m_active->get( true ) && m_showManipulators->get() )
{ {
m_s0->unhide(); m_s0->unhide();
m_s1->unhide(); m_s1->unhide();
...@@ -205,11 +211,6 @@ void WMArbitraryPlane::moduleMain() ...@@ -205,11 +211,6 @@ void WMArbitraryPlane::moduleMain()
m_buttonReset2Sagittal->set( WPVBaseTypes::PV_TRIGGER_READY, false ); m_buttonReset2Sagittal->set( WPVBaseTypes::PV_TRIGGER_READY, false );
m_dirty = true; m_dirty = true;
} }
if ( m_shutdownFlag() )
{
break;
}
} }
con.disconnect(); con.disconnect();
......
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