Commit 681fcdcd by schurade

[IMPROVE] module accepts and reacts to the active flag now

parent bfb1253e
......@@ -144,6 +144,7 @@ void WMPaintTexture::moduleMain()
m_moduleState.setResetable( true, true );
m_moduleState.add( m_input->getDataChangedCondition() );
m_moduleState.add( m_propCondition );
m_moduleState.add( m_active->getUpdateCondition() );
ready();
......@@ -184,6 +185,25 @@ void WMPaintTexture::moduleMain()
WKernel::getRunningKernel()->getSelectionManager()->setPaintMode( PAINTMODE_NONE );
}
}
if ( m_active->changed() )
{
if ( m_active->get( true ) )
{
if ( m_painting->get( true ) )
{
WKernel::getRunningKernel()->getSelectionManager()->setPaintMode( PAINTMODE_PAINT );
}
WKernel::getRunningKernel()->getSelectionManager()->setUseTexture( true );
WDataHandler::getDefaultSubject()->getChangeCondition()->notify();
}
else
{
WKernel::getRunningKernel()->getSelectionManager()->setUseTexture( false );
WKernel::getRunningKernel()->getSelectionManager()->setPaintMode( PAINTMODE_NONE );
WDataHandler::getDefaultSubject()->getChangeCondition()->notify();
}
}
}
else // case !dataValid
{
......
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