To compare if two property contains the same content. The default
implementation in Property uses the persistense interface to save both
properties to string and compares the content. This may not work at the
moment if the property saves content in separate file or in binary.
Various properties have cheaper implementation to direct compare their
internal values.
The enumeration items are exposed through sub path '.Enum'. When
'ShowAll' is enabled in property view, this sub path is exposed as a
sub property item named 'Enum', and can be either manually edited or
bound with an expression.
‣ Make countersink and counterbore on metric holes freely definable by user.
‣ Fixed the Naming of M1.6, M2, M2.5 and M3.5
‣ Added constructor for custom enums from Enums to PropertyEnumeration
‣ Put definitions of cut-types (counterbore/countersink) for
screwtypes into json-files for easy modification.
‣ Allow users to put its own definitions in json-files in
[UserDir]/Mod/PartDesign/Resources/Hole
‣ Contains several examples of cut-type definition json-files that are
propably not production-ready.
This uses a local copy of nlohmann::json¹ to read json-files.
__________
¹ This is a very nice,header-only C++ library under the MIT License
(https://github.com/nlohmann/json). I copied the single-file-version
and the forward-declaration-header into …/PartDesign/App/ so no new
dependencies arise.
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.
Property:
* Extended property status bitset. Mirror most of PropertyType and
allow dynamic change property type.
* Cache property name and type to improve performance
* Centralize property status change signalling
* Change aboutToSetValue()/hasSetValue() to virtual
* Add new API getFullName() to obtain full quanlified name of the property
AtomicPropertyChangeInterface:
* Allow calling aboutToSetValue()/hasSetValue() when actually changed
PropertyLists:
* Refactor implementation by an abstract class PropertyListBase and a
template class PropertyListsT, to allow better code reuse.
PropertyListT is derived from AtomicPropertyChangeInterface to allow
more efficient change on individual elements.
* All list type property now accept setting python value as a dictionary
with index as key to set individual element of a list.
* Add touch list for more efficient handling of value changes. The list
contains the index of changed value. And empty touch list should be
treated as the entire list is changed. PropertyContainerPy expose this
functionality with getPropertyTouchList().
PropertyPersistentObject:
* New property to allow dynamic creation of any FreeCAD object derived
from Base::Persistence, and use it as a property.
DynamicProperty:
* Use boost multi_index_container for efficient property lookup while
keeping order.
* Modify to be allowed to use in PropertyContainer directly
PropertyContainer:
* Use boost multi_index_container for efficient property lookup while
keeping order.
* Allow adding/removing dynamic property on all property container
* Modify Save/Restore() to persist property status, and better handle
transient property which can now be dynamically enabled/disabled per
object.
* Add new API getFullName() to obtain full quanlified name of the property.
Implemented by Document, DocumentObject, and also
ViewProviderDocumentObject if future patch
DocumentObject and FeaturePython are modified to accommondate the
dynamic property changes.
Removed get/setCustomAttribute() implementation from DocumentObjectPy,
and rely on PropertyContainerPy for the implementation, because of the
additional dynamic property support in property container.
Gui::ViewProviderDocumentObject, which is derived from
PropertyContainer, is also modified accordingly
+ when reading an enumeration ignore negative indexes and print a warning
+ raise an exception when trying to get the current value of an invalid enumeration
- New editor for MapMode with button to open attacher dialog
- Hide attachment properties when they are not applicable
- Disable super placement ui in attacher dialog when object is not attached
- Always select used mode in mode list