Commit 732eb514 authored by schurade's avatar schurade

[FIX] properly disconnect the pick signal when shutting down the module

parent 05409210
......@@ -138,8 +138,8 @@ void WMPaintTexture::propertyChanged( boost::shared_ptr< WPropertyBase > propert
void WMPaintTexture::moduleMain()
{
WKernel::getRunningKernel()->getGraphicsEngine()->getViewer()->getPickHandler()->getPickSignal()->connect(
boost::bind( &WMPaintTexture::queuePaint, this, _1 ) );
boost::signals2::connection con = WKernel::getRunningKernel()->getGraphicsEngine()->getViewer()->getPickHandler()->getPickSignal()->
connect( boost::bind( &WMPaintTexture::queuePaint, this, _1 ) );
m_moduleState.setResetable( true, true );
m_moduleState.add( m_input->getDataChangedCondition() );
......@@ -206,8 +206,11 @@ void WMPaintTexture::moduleMain()
debugLog() << "Shutting down...";
WKernel::getRunningKernel()->getSelectionManager()->setUseTexture( false );
WKernel::getRunningKernel()->getSelectionManager()->setPaintMode( PAINTMODE_NONE );
WDataHandler::getDefaultSubject()->getChangeCondition()->notify();
con.disconnect();
debugLog() << "Finished! Good Bye!";
}
......
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