Commit Graph

25 Commits

Author SHA1 Message Date
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