FreeCAD: staging 429c4846

Author Committer Branch Timestamp Parent
Zheng, Lei Zheng, Lei staging 2019-07-04 09:25:55 staging 8026ff13
Changeset DocumentObject: add allowDuplicateLabel/onBeforeChangeLabel()

These two APIs allow an object to control its own labeling rules.
The previous auto re-labeling for uniqueness logic is moved from
ObjectLabelObserver (resides in Application.cpp) to PropertyString.

DocumentObject::allowDuplicateLabel() is used to inform PropertyString
that the object allows duplicate label regardless of application
setting. onBeforeChangeLabel() is called before actual label change to
give object a chance to override the new label.
mod - src/App/Application.cpp Diff File
mod - src/App/DocumentObject.h Diff File
mod - src/App/DocumentObjectPy.xml Diff File
mod - src/App/DocumentObjectPyImp.cpp Diff File
mod - src/App/PropertyStandard.cpp Diff File
mod - src/App/PropertyStandard.h Diff File