Added PropertyExpressionEngine to DocumentObject class.

This commit is contained in:
Eivind Kvedalen
2015-09-17 00:55:54 +02:00
committed by wmayer
parent 8259ec6764
commit fb2b1a6ec0
6 changed files with 166 additions and 4 deletions

View File

@@ -1191,6 +1191,7 @@ void Document::restore (void)
// reset all touched
for (std::map<std::string,DocumentObject*>::iterator It= d->objectMap.begin();It!=d->objectMap.end();++It) {
It->second->connectRelabelSignals();
It->second->onDocumentRestored();
It->second->purgeTouched();
}
@@ -1362,6 +1363,29 @@ Document::getDependencyList(const std::vector<App::DocumentObject*>& objs) const
return ary;
}
/**
* @brief Signal that object identifiers, typically a property or document object has been renamed.
*
* This function iterates through all document object in the document, and calls its
* renameObjectIdentifiers functions.
*
* @param paths Map with current and new names
*/
void Document::renameObjectIdentifiers(const std::map<App::ObjectIdentifier, App::ObjectIdentifier> &paths)
{
std::map<App::ObjectIdentifier, App::ObjectIdentifier> extendedPaths;
std::map<App::ObjectIdentifier, App::ObjectIdentifier>::const_iterator it = paths.begin();
while (it != paths.end()) {
extendedPaths[it->first.canonicalPath()] = it->second.canonicalPath();
++it;
}
for (std::vector<DocumentObject*>::iterator it = d->objectArray.begin(); it != d->objectArray.end(); ++it)
(*it)->renameObjectIdentifiers(extendedPaths);
}
void Document::_rebuildDependencyList(void)
{
d->VertexObjectList.clear();