Commit 901cff6b3a03084660ec19c27b8a57ab7f008624
1 parent
3915c772
Call init when a property is changed via setPropertyRecursive
This gives transforms a chance to update their state to reflect any changes made.
Showing
2 changed files
with
9 additions
and
2 deletions
openbr/openbr_plugin.cpp
openbr/plugins/openbr_internal.h
| ... | ... | @@ -206,7 +206,11 @@ public: |
| 206 | 206 | if (br::Object::setPropertyRecursive(name, value)) |
| 207 | 207 | return true; |
| 208 | 208 | |
| 209 | - return transform->setPropertyRecursive(name, value); | |
| 209 | + if (transform->setPropertyRecursive(name, value)) { | |
| 210 | + init(); | |
| 211 | + return true; | |
| 212 | + } | |
| 213 | + return false; | |
| 210 | 214 | } |
| 211 | 215 | }; |
| 212 | 216 | |
| ... | ... | @@ -307,8 +311,10 @@ public: |
| 307 | 311 | |
| 308 | 312 | for (int i=0; i < this->transforms.size();i++) |
| 309 | 313 | { |
| 310 | - if (transforms[i]->setPropertyRecursive(name, value)) | |
| 314 | + if (transforms[i]->setPropertyRecursive(name, value)) { | |
| 315 | + init(); | |
| 311 | 316 | return true; |
| 317 | + } | |
| 312 | 318 | } |
| 313 | 319 | return false; |
| 314 | 320 | } | ... | ... |