ExpressionCompleter: Skip all types of links when building completer model.

This commit is contained in:
Eivind Kvedalen 2015-09-24 00:14:42 +02:00 committed by wmayer
parent 10786c65b8
commit 0894d5bdae

View File

@ -13,6 +13,7 @@
#include <App/DocumentObject.h>
#include <App/ObjectIdentifier.h>
#include "ExpressionCompleter.h"
#include <App/PropertyLinks.h>
Q_DECLARE_METATYPE(App::ObjectIdentifier);
@ -125,6 +126,14 @@ void ExpressionCompleter::createModelForDocumentObject(const DocumentObject * do
std::vector<App::Property*>::const_iterator pi = props.begin();
while (pi != props.end()) {
// Skip all types of links
if ((*pi)->isDerivedFrom(App::PropertyLink::getClassTypeId()) ||
(*pi)->isDerivedFrom(App::PropertyLinkSub::getClassTypeId())) {
++pi;
continue;
}
createModelForPaths(*pi, parent);
++pi;
}