diff --git a/PendulumC++/onelab.h b/PendulumC++/onelab.h index 1bf5c359882eb58674393bdc6fd7841a4649c6b6..422e65bb3e9dba9a1aabb8dcaafdfe108a5b81bb 100644 --- a/PendulumC++/onelab.h +++ b/PendulumC++/onelab.h @@ -504,7 +504,14 @@ namespace onelab{ setVisible(p.getVisible()); setReadOnly(p.getReadOnly()); setAttributes(p.getAttributes()); - if(p.getValue() != getValue()){ // FIXME change this + bool changed = false; + for(unsigned int i = 0; i < p.getValues().size(); i++){ + if(p.getValues()[i] != getValues()[i]){ + changed = true; + break; + } + } + if(changed){ setValues(p.getValues()); setChanged(getChangedValue()); } @@ -685,7 +692,14 @@ namespace onelab{ setVisible(p.getVisible()); setReadOnly(p.getReadOnly()); setAttributes(p.getAttributes()); - if(p.getValue() != getValue()){ // FIXME: change this + bool changed = false; + for(unsigned int i = 0; i < p.getValues().size(); i++){ + if(p.getValues()[i] != getValues()[i]){ + changed = true; + break; + } + } + if(changed){ setValues(p.getValues()); setChanged(getChangedValue()); } @@ -908,11 +922,13 @@ namespace onelab{ { return _get(ps, name, client, _strings); } - void getPtr(number **ptr, const std::string name, const std::string client="") + void getPtr(number **ptr, const std::string &name, + const std::string &client = "") { *ptr = _getPtr(name, client, _numbers); } - void getPtr(string **ptr, const std::string name, const std::string client="") + void getPtr(string **ptr, const std::string &name, + const std::string &client = "") { *ptr = _getPtr(name, client, _strings); }