App/Gui: Fix auto checking 'Sync sub object' if property link editor
Related FreeCAD/FreeCAD#6672 case C
This commit is contained in:
@@ -939,6 +939,11 @@ PropertyLinkSub::~PropertyLinkSub()
|
||||
#endif
|
||||
}
|
||||
|
||||
void PropertyLinkSub::setSyncSubObject(bool enable)
|
||||
{
|
||||
_Flags.set((std::size_t)LinkSyncSubObject, enable);
|
||||
}
|
||||
|
||||
void PropertyLinkSub::setValue(App::DocumentObject * lValue,
|
||||
const std::vector<std::string> &SubList, std::vector<ShadowSub> &&shadows)
|
||||
{
|
||||
@@ -1614,6 +1619,11 @@ PropertyLinkSubList::~PropertyLinkSubList()
|
||||
#endif
|
||||
}
|
||||
|
||||
void PropertyLinkSubList::setSyncSubObject(bool enable)
|
||||
{
|
||||
_Flags.set((std::size_t)LinkSyncSubObject, enable);
|
||||
}
|
||||
|
||||
void PropertyLinkSubList::verifyObject(App::DocumentObject* obj, App::DocumentObject* parent)
|
||||
{
|
||||
if (obj) {
|
||||
@@ -2968,6 +2978,7 @@ PropertyXLink::PropertyXLink(bool _allowPartial, PropertyLinkBase *parent)
|
||||
{
|
||||
setAllowPartial(_allowPartial);
|
||||
setAllowExternal(true);
|
||||
setSyncSubObject(true);
|
||||
if(parent)
|
||||
setContainer(parent->getContainer());
|
||||
}
|
||||
@@ -2976,6 +2987,11 @@ PropertyXLink::~PropertyXLink() {
|
||||
unlink();
|
||||
}
|
||||
|
||||
void PropertyXLink::setSyncSubObject(bool enable)
|
||||
{
|
||||
_Flags.set((std::size_t)LinkSyncSubObject, enable);
|
||||
}
|
||||
|
||||
void PropertyXLink::unlink() {
|
||||
if(docInfo) {
|
||||
docInfo->remove(this);
|
||||
@@ -3835,12 +3851,18 @@ TYPESYSTEM_SOURCE(App::PropertyXLinkSubList , App::PropertyLinkBase)
|
||||
PropertyXLinkSubList::PropertyXLinkSubList()
|
||||
{
|
||||
_pcScope = LinkScope::Global;
|
||||
setSyncSubObject(true);
|
||||
}
|
||||
|
||||
PropertyXLinkSubList::~PropertyXLinkSubList()
|
||||
{
|
||||
}
|
||||
|
||||
void PropertyXLinkSubList::setSyncSubObject(bool enable)
|
||||
{
|
||||
_Flags.set((std::size_t)LinkSyncSubObject, enable);
|
||||
}
|
||||
|
||||
int PropertyXLinkSubList::getSize(void) const
|
||||
{
|
||||
return static_cast<int>(_Links.size());
|
||||
|
||||
Reference in New Issue
Block a user