* project to document on information, merge, util
* change project to document in unit system dialog
---------
Co-authored-by: WandererFan <WandererFan@gmail.com>
* Change no need function newDocument("Unnamed") call to variant without parameter. "Unnamed" set in App newDocument function instead.
* Refactor New Document command to run without parameter.
* Translate new document's userName. Internal name = "Unnamed".
* Crowdin Add to updatets.py App.ts. Create new file App.ts
* Fix error where document name is set with one function parameter. In this situation set internal and user name to string variable. For default function call (without parameter) set internal name to Unnamed, userName = translate ("Unnamed")
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto.
* When possible use a ranged for loop instead of begin() and end() iterators
When exporting a single file, the filename defaults to the current FCStd
name plus a dash and the name of the object. If multiple objects are
selected, the default is the basename of the FCStd file. No extension is
added. This behavior is controllable via two hidden preferences,
BaseApp/Preferences/General/ExportDefaultFilenameSingle
BaseApp/Preferences/General/ExportDefaultFilenameMultiple
_Allow regeneration of default on new exports_
If an export has been done and it used the default filename, on the next
export regenerate the filename (potentially updating the selected object
name in that filename) instead of just defaulting to the last name.
_Search for extension in chosen filter first_
Originally the file dialog simply searched for the first available extension
in the overall filter list. This commit modifies it to first check the
selected extension, and only if that is empty to search the full filter
list. This section of code only runs if a default filename is set but
does not have an extension ("suffix" in Qt's terms).
========================================================
If the restore of Document.xml results in invalid Document.xml (because unhandled exceptions occurred), the
document status Document::restoreError is set. The GUI or Mod/Web if a link was clicked, show a pop-up indicating
this situation.
This commit also shows an appropriate pop-up for the partialRestore when opening from the menu, that before only
appeared when opening by clicking a link.
This commit adds SVG files with icons for these commands. Also, it makes the necessary changes on CommandDoc.cpp, CommandWindow.cpp, CommandStd.cpp and resource.qrc files.