* [Gui] fix the FPS text visibilty issues
* [Gui] code efficiency based on suggestions
* [Gui] update color parameter
* [Gui] Fix Lint feedback
* [Gui] check if string is empty
* Measurement: save 'Show Delta' state between commands #19204
When users set Show Delta option to off in the Measure tool, the setting
was not being preserved when the tool was invoked again. This was due to
using an uninitialized value as the default when loading the preference.
Changes staged in: FreeCAD\src\Mod\Measure\Gui\TaskMeasure.cpp
Fixed by:
- Using explicit 'true' as default value when loading Show Delta
preference
- Maintains existing save functionality
- Ensures consistent behavior on first use
Fixes#19204
* Changed few things to ensure the delta state is saved #19204
added changes:-
1. settings.endGroup()
When we call beginGroup(), it creates a prefix for all subsequent settings operations, All settings will be stored under the "TaskMeasure" group.
endGroup() is needed to close this grouping scope
Without it, subsequent settings operations would still use the "TaskMeasure" prefix
2. settings.sync()
By default, QSettings caches changes in memory and writes them to disk later
sync() makes an immediate write to the settings file
This ensures the setting is saved right away rather than waiting for Qt to decide when to save.
Makes the setting change immediately available for future commands.
-Fixes Measurement: save 'Show Delta' state between commands #19204
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added proposed changes to autoSaveChanged() and newMeasurementBehaviourChanged() functions #19204#19430
Added settings.endGroup() to the following functions:-
1.autoSaveChanged()
2.newMeasurementBehaviourChanged()
Each beginGroup() should be followed by endGroup().
No need for explicitily calling sync() as it is called automatically from QSettings's destructor and by the event loop at regular intervals.(Refer documentation for more info)
-Fixes Measurement: save 'Show Delta' state between commands #19204#19430
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: change to ternary op
* refactor: apply recommendations to widgets
* refactor: use QSignalBlocker
* refactor: address some compiler complaints
* refactor: add namespace Gui to new widgets
* Fix bug preventing filtering named constraints
There was a bug (see issue #11843) that displayed a filter for Named
constraints in the Sketcher Workbench whose toggling did not affect the
UI in any way. This enables this feature by checking if a given
constraint has a custom name or not and then appropriately toggling its
visibility.
* Use `std::string::empty()` per reviewer suggestion
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Reset alpha channel value to 1 at the end of 3d rendering. The way Qt handles OpenGL widgets with transparent pixels in their final output is inconsistent.
Ensures:
* _class_ is based on BaseClass
* _class_ parameter includes a namespace
And when _class_ is a document object
* namespace is not global namespace
* namespace name is in path after /src/ or /src/Mod/
The document object requirements are needed to auto import modules when using addObject