[PartDesign] Fix string encoding for document name and face reference
This commit is contained in:
@@ -77,11 +77,11 @@ const QString TaskSketchBasedParameters::onAddSelection(
|
||||
// Remove subname for planes and datum features
|
||||
if (PartDesign::Feature::isDatum(selObj)) {
|
||||
subname = "";
|
||||
refStr = QString::fromLatin1(selObj->getNameInDocument());
|
||||
refStr = QString::fromUtf8(selObj->getNameInDocument());
|
||||
}
|
||||
else if (subname.size() > 4) {
|
||||
int faceId = std::atoi(&subname[4]);
|
||||
refStr = QString::fromLatin1(selObj->getNameInDocument()) + QStringLiteral(":")
|
||||
refStr = QString::fromUtf8(selObj->getNameInDocument()) + QStringLiteral(":")
|
||||
+ QObject::tr("Face") + QString::number(faceId);
|
||||
}
|
||||
|
||||
@@ -249,8 +249,8 @@ QString TaskSketchBasedParameters::getFaceReference(const QString& obj, const QS
|
||||
return {};
|
||||
}
|
||||
|
||||
return QString::fromLatin1(R"((App.getDocument("%1").%2, ["%3"]))")
|
||||
.arg(QString::fromLatin1(doc->getName()), o, sub);
|
||||
return QString::fromUtf8(R"((App.getDocument("%1").%2, ["%3"]))")
|
||||
.arg(QString::fromUtf8(doc->getName()), o, sub);
|
||||
}
|
||||
|
||||
QString TaskSketchBasedParameters::make2DLabel(
|
||||
@@ -339,3 +339,4 @@ bool TaskDlgSketchBasedParameters::reject()
|
||||
}
|
||||
|
||||
#include "moc_TaskSketchBasedParameters.cpp"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user