Commit 901cff6b3a03084660ec19c27b8a57ab7f008624

Authored by Charles Otto
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.
openbr/openbr_plugin.cpp
... ... @@ -724,6 +724,7 @@ bool Object::setPropertyRecursive(const QString & name, QVariant value)
724 724  
725 725 qDebug() << "Class: " << metaObject()->className() << "took property" << name;
726 726 setProperty(name, value);
  727 + init();
727 728 return true;
728 729 }
729 730  
... ...
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 }
... ...