Commit Graph

26 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Kacper Donat
d718586463 Gui: Make datum planes bigger 2025-09-08 23:16:29 +02:00
wmayer
385f21a26e Core: Fixes #18717
Neither in #18332 nor in any of the referenced issues a reason is given why the placement of the coordinate axes must be changed.
Only doing it to make the client code look more consistent is not a valid reason.

This change breaks forward and backward compatibility and with #18717 we already have a hard to solve issue. Furthermore, at this
point of time it's not even clear what other collateral damage the change may cause.

So, this commit hides all the implementation details of the DatumElement and restores the original placement for the axes.
This commit makes the line migration code obsolete
2025-01-02 13:27:54 +01:00
PaddleStroke
4892fcaaf1 Core datums: Rework to improve new sketch 2024-12-30 09:05:44 +01:00
PaddleStroke
655ae579ed Core: Datums: Fix axis placement and add migration script. 2024-12-13 18:04:10 +01:00
PaddleStroke
dbdbc9934e Core: SoShapeScale fix weird scaling on viewport resize. See https://github.com/FreeCAD/FreeCAD/issues/18382#issuecomment-2527623758 2024-12-10 17:15:13 +01:00
wmayer
c2714fc8c5 Gui: Rename ViewProviderDatum::getRoot() to ViewProviderDatum::getDatumRoot()
Before the change the compiler raised the warning: 'Gui::ViewProviderDatum::getRoot' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
In the base class the method getRoot() is declared as const while in ViewProviderDatum it's not and that's why it's considered as an overloaded method.
However, this signature causes two problems:
1. In the client code it's not always clear which version of getRoot() should be called
2. It violates const-correctness

So, trying to declare the method ViewProviderDatum::getRoot() as const it now overrides the method of the base class (and fixes the warning) but
this doesn't lead to the expected result: See https://forum.freecad.org/viewtopic.php?p=796064#p796064

The other option is to rename the method. And this gives the expected result now.
2024-12-10 12:49:42 +01:00
PaddleStroke
b2f965c06e ViewProviderOrigin: Renamed to ViewProviderCoordinateSystem 2024-11-27 12:15:53 +01:00
PaddleStroke
4ebb66838c Core: Add App::LocalCoordinateSystem.
Most of App::Origin is moved into this sub class of App::Origin.
Add App::Point. Change graphics of the planes/axis.
Remove scale-by-content behavior and make it fixed size on screen.
2024-11-26 17:36:02 +01:00
PaddleStroke
3993bfede7 Rename ViewProviderOriginFeature to ViewProviderDatum 2024-11-26 15:36:48 +01:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* 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
2022-09-14 13:25:13 -05:00
Uwe
a65c88d3c5 [Gui] ViewProviderLink etc.: remove unused includes
- also put headers to PreCompiled.h
2022-03-06 01:11:42 +01:00
0penBrain
0019726cd8 [GUI] Allow origin plane/axis selection with entire label bounding box 2022-01-20 00:32:24 +01:00
vosk
1300c630f4 [Part] - Fix memory leaks 2021-01-28 15:45:00 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
luz.paz
04ba2872f0 src/Gui: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Gui` files
2019-12-25 11:39:17 +01:00
Stefan Tröger
5da7aed8e1 Update Group/Part Icons and copy/paste behaviour 2017-09-09 16:55:55 +02:00
Alexander Golubev
1b76b1117d Gui: refactor Plane's and Line's ViewProviders and add yet another one for OriginFeature
- Share the code of Gui::ViewProviderPlanes and Gui::ViewProviderLine
   in Gui::ViewProviderOriginFeature
 - Add support for coloring and transparencing the OriginFeatures by
   ViewProviderGeometryObject means.
2016-04-12 18:12:18 +02:00
Stefan Tröger
f6f2565b8c fix origin plane and line viewprovider
master changed the highlight code for viewproviders, needed an adjustement after rebase
2016-04-12 18:12:18 +02:00
Stefan Tröger
acf70fb0e1 viewprovider for coordinate system update 2016-04-12 18:12:08 +02:00
Stefan Tröger
7a86e3bfe0 less intrusive base plane colors 2016-04-12 18:12:06 +02:00
Stefan Tröger
d5d6b30af3 move feature pick dialog into the task view 2016-04-12 18:12:05 +02:00
Stefan Tröger
4d1ccd63c6 Prevent origin and base entities from transforming 2016-04-12 18:12:05 +02:00
Stefan Tröger
b401f07bdf add base lines 2016-04-12 18:12:05 +02:00