Skip to content

Commit

Permalink
[Part] Fix untranslated imported file name for .step .iges
Browse files Browse the repository at this point in the history
  • Loading branch information
KuzemkoA committed May 1, 2022
1 parent 6bfff7c commit 9675d47
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Mod/Part/App/AppPartPy.cpp
Expand Up @@ -110,7 +110,7 @@
#include "TopoShapeSolidPy.h"
#include "TopoShapeWirePy.h"
#include "TopoShapeVertexPy.h"

#include <QObject>
#ifdef FCUseFreeType
# include "FT2FC.h"
#endif
Expand Down Expand Up @@ -637,7 +637,8 @@ class Module : public Py::ExtensionModule<Module>

if (file.hasExtension("stp") || file.hasExtension("step")) {
// create new document and add Import feature
App::Document *pcDoc = App::GetApplication().newDocument("Unnamed");
QString newDocumentName = QObject::tr("Unnamed");
App::Document *pcDoc = App::GetApplication().newDocument(qUtf8Printable(newDocumentName));
#if 1
ImportStepParts(pcDoc,EncodedName.c_str());
#else
Expand All @@ -648,7 +649,8 @@ class Module : public Py::ExtensionModule<Module>
}
#if 1
else if (file.hasExtension("igs") || file.hasExtension("iges")) {
App::Document *pcDoc = App::GetApplication().newDocument("Unnamed");
QString newDocumentName = QObject::tr("Unnamed");
App::Document *pcDoc = App::GetApplication().newDocument(qUtf8Printable(newDocumentName));
ImportIgesParts(pcDoc,EncodedName.c_str());
pcDoc->recompute();
}
Expand Down

0 comments on commit 9675d47

Please sign in to comment.