Skip to content

Commit

Permalink
[App] First part of fixing "Harcoded name for first new document and …
Browse files Browse the repository at this point in the history
…imported doc(without translation"

FreeCAD/FreeCAD-translations#124
  • Loading branch information
KuzemkoA committed May 1, 2022
1 parent a551894 commit 47c32e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App/Application.cpp
Expand Up @@ -435,9 +435,11 @@ void Application::renameDocument(const char *OldName, const char *NewName)

Document* Application::newDocument(const char * Name, const char * UserName, bool createView, bool tempDoc)
{
QString L10nName = QObject::tr("Unnamed");
// get a valid name anyway!
if (!Name || Name[0] == '\0')
Name = "Unnamed";
Name = qUtf8Printable(L10nName);
// Name = (L10nName.toStdString()).c_str();
string name = getUniqueDocumentName(Name, tempDoc);

// return the temporary document if it exists
Expand Down

0 comments on commit 47c32e6

Please sign in to comment.