Commit f6f4a0ea authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - updates missed with onChildUpdate callback due to wrong WCondition.

parent 3812d3c0
......@@ -45,6 +45,7 @@ WPropertyGroupBase::WPropertyGroupBase( std::string name, std::string descriptio
m_childUpdateCondition( new WConditionSet() )
{
m_updateCondition->add( m_properties.getChangeCondition() );
m_childUpdateCondition->subscribeSignal( boost::bind( &WPropertyGroupBase::onChildUpdate, this ) );
}
WPropertyGroupBase::~WPropertyGroupBase()
......@@ -73,6 +74,7 @@ WPropertyGroupBase::WPropertyGroupBase( const WPropertyGroupBase& from ):
// add the change condition of the prop list
m_updateCondition->add( m_properties.getChangeCondition() );
m_childUpdateCondition->subscribeSignal( boost::bind( &WPropertyGroupBase::onChildUpdate, this ) );
}
boost::shared_ptr< WCondition > WPropertyGroupBase::getChildUpdateCondition() const
......@@ -207,3 +209,6 @@ WPropertyGroupBase::PropertySharedContainerType::ReadTicket WPropertyGroupBase::
return m_properties.getReadTicket();
}
void WPropertyGroupBase::onChildUpdate()
{
}
......@@ -193,6 +193,11 @@ protected:
*/
boost::shared_ptr< WConditionSet > m_childUpdateCondition;
/**
* Callback of m_childUpdateCondition. Overwrite this method to extend the default notification with some custom code.
*/
virtual void onChildUpdate();
/**
* Compares the names of two properties and returns true if they are equal.
*
......
......@@ -306,8 +306,9 @@ public:
*/
const WPropertyBase::SPtr& getProperty( size_t n ) const
{
WPropertyStruct* nonconst = const_cast< WPropertyStruct* >( this );
return nonconst->getProperty( n );
// lock, unlocked if l looses focus
PropertySharedContainerType::ReadTicket l = m_properties.getReadTicket();
return l->get()[ n ];
}
/**
......
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