Commit Graph

40237 Commits

Author SHA1 Message Date
Roy-043
ee7f52060b Draft: gui_utils.py fix error in select function (#19539)
* Draft: gui_utils.py fix error in select function

PR #18795 changed the select function to also handle tuples. This PR adds a check to ensure the referenced objects in the tuple still exist before calling `Gui.Selection.addSelection()`.
2025-02-13 16:00:30 +01:00
Chris Hennes
9fccfa115d TD: Add missing #include "PreCompiled.h" (#19547)
* TD: Add missing #include "PreCompiled.h"

* Update src/Mod/TechDraw/Gui/CommandAlign.cpp

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* TD: Add guards around QMessageBox include

---------

Co-authored-by: WandererFan <WandererFan@gmail.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-02-12 21:28:34 -06:00
Syres916
d044d3da84 [BIM] fix name 'self' is not defined error 2025-02-12 14:23:31 +01:00
Syres916
d92bb8611e [BIM] Fix translate error 2025-02-12 14:23:31 +01:00
Chris Hennes
8899e3476e Merge pull request #19548 from oursland/update-ci-ubuntu
CI: Update Ubuntu 20.04 to Ubuntu 22.04
2025-02-11 22:03:31 -06:00
Jacob Oursland
546bd59ecf CI: Update Ubuntu 20.04 to Ubuntu 22.04. 2025-02-11 16:45:51 -08:00
Jacob Oursland
9ffbb6d128 CI: Rename Ubuntu 20.04 to just Ubuntu. 2025-02-11 16:45:51 -08:00
jffmichi
72c37f9b75 PartDesign: fix crash when opening a file with a metric hole 2025-02-11 17:35:35 -06:00
Chris Hennes
c962dbbeb6 Merge pull request #19167 from alfrix/hole_new_taskpanel
feat(PD): hole taskpanel: new image based cut panel
2025-02-11 17:22:16 -06:00
Syres916
62c5267e64 [Gui] fix the FPS text visibilty issues raised in #19371 (#19385)
* [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
2025-02-11 13:16:29 -06:00
GS-GOAT
271c446493 Measurement: save 'Show Delta' state between commands #19204 (#19430)
* 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>
2025-02-11 13:10:53 -06:00
Alfredo Monclus
da4f584a50 PD(hole taskpanel): apply review suggestions
* 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
2025-02-11 12:23:13 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
0ece6f3201 Base: [ Doxygen ] Improved parameter attribute methods (#19491) 2025-02-11 11:44:52 -06:00
Alfredo Monclus
3202dde7ca PD(hole taskpanel): Add custom widget for font-scaled SVGs
* feat: add custom widget for font scaled svgs
* refactor(PD): hole taskpanel svg tweaks
* fix(PD): build link on windows
2025-02-11 11:31:38 -06:00
Alfredo Monclus
de7a237a8a PD(hole taskpanel): Include depth on diagram
feat(PD): hole diagram add include depth
refactor(PD): hole taskpanel: images add background
2025-02-11 11:31:38 -06:00
Alfredo Monclus
be3ce13a7c PD(hole taskpanel): Add image-based hole cut panel
* feat(PD): hole taskpanel: new image based cut panel
* fix(PD): hole taskpanel fix dynamic cut types
* refactor(PD): hole taskpanel: renames and vlayouts to keep labels closer
* fix(PD): hole diagram tweaks
2025-02-11 11:31:17 -06:00
Ian Hunter
67f8852697 Fix bug preventing filtering named constraints (#19339)
* 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>
2025-02-11 11:03:04 -06:00
Chris Hennes
e7c86d7710 Core: Update copyright date range to include 2025 (#19520)
* Main: Update copyright date range to include 2025
* GUI: Update copyright date range to include 2025
2025-02-11 10:59:12 -06:00
Chris Hennes
a4901e2ccb Merge pull request #19142 from hyarion/refactor/add-template-addobject
Add new addObject<T>() function
2025-02-11 09:42:47 -06:00
Karliss
cb8c193408 Workaround for transparency problems on wayland.
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.
2025-02-11 07:59:28 -06:00
Chris Hennes
1350dd6bd0 Merge pull request #19502 from benj5378/QStringLiteral
Use QStringLiteral
2025-02-11 07:34:12 -06:00
Benjamin Bræstrup Sayoc
4d9e4efc87 [TechDraw] Add ability to align points by rotating view
Fixes #7061
2025-02-10 19:31:39 -05:00
Chris Hennes
516595fbce Merge pull request #18594 from Flast/performance/base/find_element
Base: Improved FindElement performance by reducing call of transcode
2025-02-10 14:33:49 -06:00
Benjamin Nauck
fdf59be4cd PD: Light refactoring of TaskFeaturePick::makeCopy 2025-02-10 18:35:38 +01:00
Benjamin Nauck
b4bb86948f Mod: Use new GroupExtension::addObject<T>(...) 2025-02-10 18:35:38 +01:00
Benjamin Nauck
d71325d83e App: Add GroupExtension::addObject<T>(...) 2025-02-10 18:35:38 +01:00
Benjamin Nauck
8cc98b9a88 Mod: Use new addObject<T>(...) that requires additional changes 2025-02-10 18:35:38 +01:00
Benjamin Nauck
a1c5767643 Mod: Use new addObject<T>(...) using regex 2025-02-10 18:35:38 +01:00
Benjamin Bræstrup Sayoc
546d973337 App: Use QStringLiteral 2025-02-10 18:34:58 +01:00
Benjamin Bræstrup Sayoc
b96d24638a Test: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
bad9499d50 Test: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
e0fb77bcdc Surface: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
adf2051003 Robot: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
fa94693a2b ReverseEngineering: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
e192045bfc Sandbox: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
5159a84402 Points: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
e9456f7115 Spreadsheet: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Bræstrup Sayoc
ee90eb6ebc PartDesign: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Benjamin Nauck
0712b481e9 App: Add Document::addObject<T>(...) to simplify code 2025-02-10 18:33:00 +01:00
Benjamin Nauck
ddb0113ded Base: Minor code cleanup in Type 2025-02-10 18:33:00 +01:00
Benjamin Nauck
8a7f886458 App: Add compile time checks for type system class name
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
2025-02-10 18:33:00 +01:00
Benjamin Nauck
7c4ff290a8 Mod: Fix mistakes in type system class names 2025-02-10 18:33:00 +01:00
Benjamin Nauck
a619c2ffd9 App: Fix _class_ passing in PROPERTY_HEADER_WITH_EXTENSIONS 2025-02-10 18:32:59 +01:00
Benjamin Nauck
0226ba1fc7 Base: Add missing const to Type::createInstance 2025-02-10 18:32:59 +01:00
Benjamin Bræstrup Sayoc
85d0884f43 Import: Use QStringLiteral 2025-02-10 18:32:45 +01:00
Benjamin Bræstrup Sayoc
63c8e4b55c Measure: Use QStringLiteral 2025-02-10 18:32:45 +01:00
Benjamin Bræstrup Sayoc
e1b39ad1f6 Fem: Use QStringLiteral 2025-02-10 18:32:45 +01:00
Benjamin Bræstrup Sayoc
f2e43191ec MeshPart: Use QStringLiteral 2025-02-10 18:32:45 +01:00
Benjamin Bræstrup Sayoc
6c61769d8c Material: Use QStringLiteral 2025-02-10 18:32:45 +01:00