From a230d0d9a3f174c0fedf5d3c8abc507e9f8c3009 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Mon, 30 Sep 2019 11:39:07 +0800 Subject: [PATCH] Gui: fix ExpressionBinding::apply() Remove extra '.' because of newly introduced local property referencing syntax. --- src/Gui/ExpressionBinding.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index ef738e0410..c2be557127 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -233,8 +233,12 @@ bool ExpressionBinding::apply() /* Skip updating read-only properties */ if (prop->isReadOnly()) return true; - - return apply(Gui::Command::getObjectCmd(docObj) + "." + getPath().toEscapedString()); + + std::string _path = getPath().toEscapedString(); + const char *path = _path.c_str(); + if(path[0] == '.') + ++path; + return apply(Gui::Command::getObjectCmd(docObj) + "." + path); } void ExpressionBinding::expressionChange(const ObjectIdentifier& id) {