Sat, 19 Oct 2013 02:33:08 +0300
changeProperty(): don't change the property if the value would not change, this should save some procecssing..
src/ldtypes.cpp | file | annotate | diff | comparison | revisions |
--- a/src/ldtypes.cpp Sat Oct 19 01:22:11 2013 +0300 +++ b/src/ldtypes.cpp Sat Oct 19 02:33:08 2013 +0300 @@ -667,6 +667,9 @@ template<class T> static void changeProperty (LDObject* obj, T* ptr, const T& val) { long idx; + if (*ptr == val) + return; + if (obj->file() && (idx = obj->getIndex()) != -1) { str before = obj->raw(); *ptr = val;