Skip to content

Commit

Permalink
Link: rename _LinkRecomputed to _LinkTouched
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder authored and wwmayer committed Aug 17, 2019
1 parent c0d0150 commit aaf0f2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/App/Link.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/App/Link.h
Expand Up @@ -57,7 +57,7 @@ class AppExport LinkBaseExtension : public App::DocumentObjectExtension
LinkBaseExtension();
virtual ~LinkBaseExtension();

PropertyBool _LinkRecomputed;
PropertyBool _LinkTouched;
PropertyLinkList _ChildCache; // cache for plain group expansion

enum {
Expand Down
6 changes: 3 additions & 3 deletions src/Gui/ViewProviderLink.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit aaf0f2c

Please sign in to comment.