Link: rename _LinkRecomputed to _LinkTouched

This commit is contained in:
Zheng, Lei
2019-07-19 11:48:03 +08:00
committed by wmayer
parent c0d0150786
commit aaf0f2c80d
3 changed files with 8 additions and 8 deletions

View File

@@ -47,10 +47,10 @@ LinkBaseExtension::LinkBaseExtension(void)
:enableLabelCache(false),myOwner(0)
{
initExtensionType(LinkBaseExtension::getExtensionClassTypeId());
EXTENSION_ADD_PROPERTY_TYPE(_LinkRecomputed, (false), " Link",
PropertyType(Prop_Hidden|Prop_Transient),0);
EXTENSION_ADD_PROPERTY_TYPE(_LinkTouched, (false), " Link",
PropertyType(Prop_Hidden|Prop_NoPersist),0);
EXTENSION_ADD_PROPERTY_TYPE(_ChildCache, (), " Link",
PropertyType(Prop_Hidden|Prop_Transient|Prop_ReadOnly),0);
PropertyType(Prop_Hidden|Prop_NoPersist|Prop_ReadOnly),0);
_ChildCache.setScope(LinkScope::Global);
props.resize(PropMax,0);
}
@@ -174,7 +174,7 @@ App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute(void) {
// The actual value of LinkRecompouted is not important, just to notify view
// provider that the link (in fact, its dependents, i.e. linked ones) have
// recomputed.
_LinkRecomputed.touch();
_LinkTouched.touch();
if(getLinkedObjectProperty() && !getTrueLinkedObject(true))
return new App::DocumentObjectExecReturn("Link broken");

View File

@@ -57,7 +57,7 @@ public:
LinkBaseExtension();
virtual ~LinkBaseExtension();
PropertyBool _LinkRecomputed;
PropertyBool _LinkTouched;
PropertyLinkList _ChildCache; // cache for plain group expansion
enum {

View File

@@ -1322,7 +1322,7 @@ void LinkView::onLinkedUpdateData(LinkInfoPtr info, const App::Property *prop) {
// of links, to inform tree view of children change, and other
// parent objects about the change. But we need to be careful to not
// touch the object if the property of change is marked as output.
ext->_LinkRecomputed.touch();
ext->_LinkTouched.touch();
}else{
// In case the owner object does not have link extension, here is a
// trick to link the signalChangedObject from linked object to the
@@ -1791,7 +1791,7 @@ void ViewProviderLink::updateDataPrivate(App::LinkBaseExtension *ext, const App:
if(!prop) return;
if(prop == &ext->_ChildCache) {
updateElementList(ext);
} else if(prop == &ext->_LinkRecomputed) {
} else if(prop == &ext->_LinkTouched) {
if(linkView->hasSubs())
linkView->updateLink();
applyColors();
@@ -2037,7 +2037,7 @@ void ViewProviderLink::finishRestoring() {
applyColors();
// TODO: notify the tree. This is ugly, any other way?
getDocument()->signalChangedObject(*this,ext->_LinkRecomputed);
getDocument()->signalChangedObject(*this,ext->_LinkTouched);
if(childVp)
childVp->finishRestoring();