Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
f6f4a0ea
Commit
f6f4a0ea
authored
Dec 05, 2011
by
Sebastian Eichelbaum
Browse files
[FIX] - updates missed with onChildUpdate callback due to wrong WCondition.
parent
3812d3c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
src/core/common/WPropertyGroupBase.cpp
src/core/common/WPropertyGroupBase.cpp
+5
-0
src/core/common/WPropertyGroupBase.h
src/core/common/WPropertyGroupBase.h
+5
-0
src/core/common/WPropertyStruct.h
src/core/common/WPropertyStruct.h
+3
-2
No files found.
src/core/common/WPropertyGroupBase.cpp
View file @
f6f4a0ea
...
...
@@ -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
()
{
}
src/core/common/WPropertyGroupBase.h
View file @
f6f4a0ea
...
...
@@ -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.
*
...
...
src/core/common/WPropertyStruct.h
View file @
f6f4a0ea
...
...
@@ -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
];
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment