src/ldtypes.cpp

changeset 521
b85554206155
parent 516
d3373bc7ca3b
child 522
afa691788bdb
equal deleted inserted replaced
520:37d5da2f188e 521:b85554206155
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

mercurial