diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 96df7570a3..a7569fae8d 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -1357,7 +1357,7 @@ void TreeWidget::onCreateGroup() "App.getDocument(\"%1\").addObject" "(\"App::DocumentObjectGroup\",\"Group\").Label=\"%2\"" ) - .arg(QString::fromLatin1(doc->getName()), name); + .arg(QString::fromUtf8(doc->getName()), name); Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8()); } else if (this->contextItem->type() == ObjectType) { @@ -1369,8 +1369,8 @@ void TreeWidget::onCreateGroup() ".newObject(\"App::DocumentObjectGroup\",\"Group\").Label=\"%3\"" ) .arg( - QString::fromLatin1(doc->getName()), - QString::fromLatin1(obj->getNameInDocument()), + QString::fromUtf8(doc->getName()), + QString::fromUtf8(obj->getNameInDocument()), name ); Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8()); @@ -6689,3 +6689,4 @@ void DocumentObjectItem::applyExpandedSnapshot( } #include "moc_Tree.cpp" +