Commit Graph

34 Commits

Author SHA1 Message Date
PaddleStroke
5e882f1773 Update ActiveObjectList.cpp 2026-01-23 17:38:46 +01:00
paddle
62cbaf7336 Assembly: Fix "deactivated by activating a App::Part, assembly stay in edit"
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"
2026-01-23 16:09:43 +01:00
PaddleStroke
abc5f90466 Assembly: prevent assembly collapse when editing sketch. (#26956)
* Gui: View provider: isAutoCollapseOnDeactivation

* Update ViewProvider.h

* Update ActiveObjectList.cpp

* Update ViewProviderAssembly.cpp

* Update ActiveObjectList.cpp
2026-01-23 16:01:06 +01:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
6ef07bb358 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
tetektoza
b3c83df151 Core: Add a possibility to extract active object based on extension 2025-06-22 23:48:52 +02:00
Kacper Donat
6e2583cdcd Gui: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
wmayer
d798901515 Core: Fix crash in ActiveObjectList
Forum: https://forum.freecad.org/viewtopic.php?t=91823
2024-11-28 17:15:39 +01:00
Zheng, Lei
e478ea7d77 Gui: deduce object path when setting active object 2023-12-17 21:27:25 +08:00
André Caldas
560898907b Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
Zheng, Lei
41dcee396d Gui: split out TreeParams into its own source files
Auto generated using TreeParams.py
2022-12-03 17:08:17 -06:00
luz paz
b17c0cce46 Gui: fix header uniformity
Make uniform all Gui/ directory headers.
2022-11-28 08:39:38 -06:00
wmayer
9eac35cf5d Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
4f5283744a [Gui] ActiveObjectList etc.: remove unused includes 2022-03-03 02:08:19 +01:00
wmayer
a9002f4218 Gui: [skip ci] improve whitespaces 2021-10-20 22:33:50 +02:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
a0d51baaf2 PVS: V547 Expression is always true/false 2020-07-18 10:59:27 +02:00
luz.paz
f11783a498 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
wmayer
1e7628f436 convert enum to enum class to fix -Wgnu-redeclared-enum 2019-11-13 22:39:27 +01:00
Zheng, Lei
68aca247ee Gui: remove FC_TREEPARAM, add document for class TreeParams 2019-09-27 15:49:42 +02:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
a9b866caa5 Gui: ActiveObjectList API changes
Support sub-object in ActiveObjectList. This means that it can now
distinguish the same object being activated under different parent,
which may be in a different document through external linking.
2019-08-17 15:08:34 +02:00
wmayer
4e973324ae when restoring object then only expand single items, not its parent items 2019-02-24 00:37:53 +01:00
wmayer
2dd876c082 auto-expand/collapse a tree item when activating it 2018-09-10 15:47:48 +02:00
wmayer
a1b0c2ff32 Gui: Better visualization of the Active Object 2018-08-19 18:14:06 +02:00
wmayer
34585e0ba0 + improve whitespaces 2016-05-22 18:44:49 +02:00
DeepSOIC
23d905e869 PartDesign (core): fix inability to deactivate active object
It was impossible to deactivate active object (Part or Body) with:
Gui.ActiveDocument.ActiveView.setActiveObject("pdbody",None)
2016-05-21 01:31:06 +03:00
Mateusz Skowroński
e797054304 Fix files encoding. Go from ISO8859-1 to UTF-8. 2016-04-15 10:22:08 +02:00
Stefan Tröger
0f30096cec make new document views obey the scene graph children stacking 2016-04-12 18:12:08 +02:00
blobfish
ae3916229d Gui: ActiveObject: remove upon delete
Squashed with:
Gui: MDIView: connection bug.
Gui: MDIView: forgot disconnect.
2016-04-12 18:12:04 +02:00
jriegel
45f7c99c1c Changing active object handling in PartDesign 2016-04-12 18:12:03 +02:00
jriegel
16ab7f710b Active object manager for the Viewer 2016-04-12 18:12:03 +02:00