665 // makes history stuff work out of the box. |
665 // makes history stuff work out of the box. |
666 // ----------------------------------------------------------------------------- |
666 // ----------------------------------------------------------------------------- |
667 template<class T> static void changeProperty (LDObject* obj, T* ptr, const T& val) |
667 template<class T> static void changeProperty (LDObject* obj, T* ptr, const T& val) |
668 { long idx; |
668 { long idx; |
669 |
669 |
|
670 if (*ptr == val) |
|
671 return; |
|
672 |
670 if (obj->file() && (idx = obj->getIndex()) != -1) |
673 if (obj->file() && (idx = obj->getIndex()) != -1) |
671 { str before = obj->raw(); |
674 { str before = obj->raw(); |
672 *ptr = val; |
675 *ptr = val; |
673 str after = obj->raw(); |
676 str after = obj->raw(); |
674 |
677 |