Since we are linking to boost anyway, use boost function for case
insensitive string compare. While there, make affected methods accept
std::string arguments, which simplifies code a bit.
- FileOptionsDialog is only used in the 'save screenshot / save image'
codepath, and currently it doesn't set a directory to it defaults to
process CWD, which is surely not what the user wants.
- The load image codepath uses a custom QFileDialog instead of the
helper code in FileDialog, there doesn't seem to be a great reason for
this, although the helper doesn't have support for mime types it seems.
- I haven't changed the dialogs to 'set/store' the working directory. I'm
not sure this is desired as this isn't a 'normal' save/load operation.
- It would be ideal to remove the FileOptionsDialog in future. The
extended functionality could be turned into a separate dialog which
opens before or after the file chooser. This would allow native dialogs
to be used and would unify the code paths for file selection.
- Further, it would be nice to just merge at least the load image into
the existing import/open option, and to put 'save image' next to
'export', but those changes may be much more time consuming.
For now I've kept it simple. Let's see what others think.
* PartDesign: Add interactive gizmo for draft operation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Cache object property list in expression completer, so it is not rebuilt for every requested index. This helps with performance when an object has a large number of properties.
Fix "Activating a body in a part in an assembly deactivates the assembly and activate the part"
Fix "A manually deactivated assembly is still restoring later"
* Gui: Fix property checkbox regression
* Update PropertyItemDelegate.cpp
* Gui: property checkbox: toggle with enter when it has focus
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Gui: Add common types to Add Property dialog
Add a preselection of commonly used types in the Add Property dialog.
The dialog supports now all properties that have an editor. This
doesn't necessarily mean that the editor is shown in the Add Property
dialog; some properties should not show their editor in the Add Property
dialog, such as vector and placement.
* Gui: Make Add Property dialog Qt 6 compatible
This change stops using a Qt 6.10 feature and makes it compatible with
all of Qt 6.
* Update src/Gui/Dialogs/DlgAddProperty.cpp
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
- The initial commit to block shortcuts in text edit fields
(particularly for MacOS, where those shortcuts would activate FreeCAD
functionality rather than text edit functionality) made a wrong
assumption.
- It assumed that there were no text edit fields where we would want to
actually use application shortcuts. In retrospect, this was very
wrong, and I completely missed the macro editor.
- For now, it should be fine to change the field to only cover
'LineEdit'. I cannot imagine a case where you'd want to (e.g.) save
text/document from a LineEdit, but if anyone knows of one then please
let me know.
- This does mean there are some quirks. For example in the materials
editor, the description is a TextEdit field. Some text editing
shortcuts won't work in here now (similar to how they didn't before
the original commit that I made).
- I've since learned that freecad also has a text editor functionality,
I've tested that now Cmd+S works for save as it should.
* Gui: Handle exception in showValidExpression
If an exception is raised inside showValidExpression() because the
expression cannot be evaluated then handle the exception and show it as
invalid expression.
This fixes issue: https://github.com/FreeCAD/FreeCAD/issues/26501
---------
Co-authored-by: wwmayer <wmayer@freecad.org>
Add Z offset for arrowheads and explicitly enable depth testing for
constraint lines in SoDatumLabel. This ensures constraint lines render
below geometry (respecting zConstr level) while text and arrowheads
render on top for better visibility and selection.
Sometimes when user would switch from editing one sketch to edit to another sketch by double clicking on the new sketch, without living the previous sketch, it would then render the text of constraints backward. This was happening because the unsetEdit of the previous sketch was clearing the selection and adding the old sketch as selected. Then the new setEdit was failing to find the correct editing placement resulting in backward text.
Since some time we have new stylesheets based on style parameters. For
compatibility reasons however old stylesheets were left in the project -
this commit removes them by reapplying the theme if old stylesheet is
detected.
* Gui: Add hidden anchor object to the root for transparency
Image planes with transparency failed to render correctly in empty scenes
because OpenInventor's two-pass transparency rendering requires at least
one opaque object to properly initialize the depth buffer.
The fix adds a zero-scaled cube with no material node (making it use
OpenGL's default opaque material) to each image plane's scene graph.
This hidden object:
- Acts as a depth buffer anchor for transparent rendering
- Is invisible (scaled to 0,0,0)
- Has negligible performance impact
This matches the workaround already used in the rotation center indicator
and resolves the issue where image transparency only worked when the
rotation center, grid, or other opaque objects were visible.
* Gui: Exclude hidden anchor from bounding box calculations
Prevents the hidden anchor from affecting "fit all" and other bounding box
operations by wrapping it in `SoSkipBoundingGroup`.