From 24579fff32a2277ac7f0f9e0f82a2fc9618fd544 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 23 Aug 2018 17:46:27 +0200 Subject: [PATCH] Py3: fix PropertyStringListItem::setValue --- src/Gui/propertyeditor/PropertyItem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 0eb3222a45..238238b7a3 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -2207,7 +2207,9 @@ void PropertyStringListItem::setValue(const QVariant& value) for (QStringList::Iterator it = values.begin(); it != values.end(); ++it) { QString text(*it); text.replace(QString::fromUtf8("'"),QString::fromUtf8("\\'")); - str << "unicode('" << text << "', 'utf-8'),"; + + std::string pystr = Base::Tools::escapedUnicodeFromUtf8(text.toUtf8()); + str << "u\"" << pystr.c_str() << "\""; } str << "]"; setPropertyValue(data);