From 2313b05db54aff2fc4b35a1264967d02e7bb8949 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 2 Dec 2016 17:04:57 +0100 Subject: [PATCH] fix encoding issue in constraint text --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index c2be37996..d6f9ea646 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -2680,7 +2680,7 @@ void ViewProviderSketch::drawConstraintIcons() if((*it)->Name.empty()) thisIcon.label = QString::number(constrId + 1); else - thisIcon.label = QString::fromLatin1((*it)->Name.c_str()); + thisIcon.label = QString::fromUtf8((*it)->Name.c_str()); iconQueue.push_back(thisIcon); // Note that the second translation is meant to be applied after the first. @@ -2696,11 +2696,12 @@ void ViewProviderSketch::drawConstraintIcons() thisIcon.destination = dynamic_cast(sep->getChild(CONSTRAINT_SEPARATOR_INDEX_SECOND_ICON)); thisIcon.infoPtr = static_cast(sep->getChild(CONSTRAINT_SEPARATOR_INDEX_SECOND_CONSTRAINTID)); } - else + else { if ((*it)->Name.empty()) thisIcon.label = QString(); else - thisIcon.label = QString::fromLatin1((*it)->Name.c_str()); + thisIcon.label = QString::fromUtf8((*it)->Name.c_str()); + } iconQueue.push_back(thisIcon); }