From 0894d5bdae1b341ed2743e22b91cfa91a96668d5 Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Thu, 24 Sep 2015 00:14:42 +0200 Subject: [PATCH] ExpressionCompleter: Skip all types of links when building completer model. --- src/Gui/ExpressionCompleter.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Gui/ExpressionCompleter.cpp b/src/Gui/ExpressionCompleter.cpp index 66eeb71ff..c98b6b9a7 100644 --- a/src/Gui/ExpressionCompleter.cpp +++ b/src/Gui/ExpressionCompleter.cpp @@ -13,6 +13,7 @@ #include #include #include "ExpressionCompleter.h" +#include Q_DECLARE_METATYPE(App::ObjectIdentifier); @@ -125,6 +126,14 @@ void ExpressionCompleter::createModelForDocumentObject(const DocumentObject * do std::vector::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; }