LGTM complains about this construct leaking memory. Commit 13927b2465
eliminated the parts of FreeCAD that throw those strings. This commit
eliminates the catch block.
This fixes three issues with the new Workbench Loader preferences panel reported by users:
* Some icons were not being properly scaled to the new 48x48 size
* Some text was being incorrectly cut off, despite fitting in the column
* The sort order of the workbenches was incorrect when external workbenches were added
In cases where the user's font is large or the Workbench name is long,
the new, narrower sidebar may not display the entire workbench name. To
address those cases, the tooltip for the element is now also set to the
workbench name. Thanks to Github user @marioalexis84 for the suggestion.
Github user @marioalexis84 found a bug that caused only the first page
of the most recently-added workbench to show. This refactors the
AddPage() static function to eliminate the early return statement that
was the cause of that bug.
A new group is added to the Preferences window that explains why
some preferences may appear to be missing due to the workbench being
unloaded. It lists the unloaded workbenches, and offers to load them,
updating the preferences dialog as necessary.
This at least partially resolves issue #4474.
Correct an error caught by @davidosterberg -- the non-native QFileDialog did
not behave as expected when not provided with a default filename, so that case
is now caught and the `selectFile()` call is bypassed.
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).
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.
Sample application is threads, springs, coils, augers, etc.
Also, remove needless requirement for positive cone angle on helixes.
Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review
Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
The infrastructure/piping seems to have been in place for a long while.
Not tested for all variations of pattern transforms.
The major enabler was removing the `break`.
Some extra piping added to let the code at call-site decide if to select multiple features or not.