Commit Graph

49 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Chris Hennes
f7b4372108 Gui: Fix string encoding for drag-and-drop 2025-10-13 17:34:59 +02:00
tetektoza
247e725ad3 Part: Allow deleting children recursively
Add feature to allow deletion of all children of compounds and booleans.
2025-09-27 19:10:42 -05:00
tetektoza
8e00addabf Core: Allow deleting objects in group recursively
Add a special marker that will signal to VPs that they should delete
their children recursively under the group.
2025-09-27 19:09:55 -05: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
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
bofdahof
e5b06ae736 Gui: apply std::ranges 2025-03-16 17:15:14 -05:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
Kacper Donat
651cefde4d Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
wmayer
76a3ec410f Core: Print warning if dragging is not allowed 2024-11-10 17:14:18 +01:00
wmayer
c14ef04b70 Core: Avoid cyclic dependencies when dragging an object into a group 2024-11-09 18:11:57 +01:00
wmayer
b7bc6ad1e6 Gui: add security checks to view provider extensions because they can be accessed if a document objects is not yet attached 2024-04-09 22:15:51 +02:00
PaddleStroke
ee0c55703f Core: Tree: Allow reordering in root and groups allowing it (parts, groups 2024-02-26 10:42:21 -06:00
Zheng, Lei
74a824cc47 Gui: fix group visibility toggle
Fixes #9277
2023-12-18 17:20:45 +01:00
wmayer
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
berniev
75acacd1b7 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
berniev
656ef8961f Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
c613304473 [Gui] ViewProviderLink etc.: remove unused includes
- also put headers to PreCompiled.h
2022-03-06 01:11:42 +01:00
luz paz
0042f58e4c Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
Zheng, Lei
bfe9681382 Gui: avoid unecessary visibility change when update view provider
This patch prevents syncing DocumentObject::Visibility when view
provider hides itself before updating. Some object may have additional
logic based on object visibility change. For example, GroupExtension
monitors its children visibility for exporting, and propgate changes to
upper hierarchy.
2019-10-09 14:01:44 +02:00
Zheng, Lei
c5112ecdc5 (GeoFeature)GroupExtension: track children visibility
The future patch will introduce Part::getTopoShape() to construct a
compound shape from a group. It will rely on the children visibility to
determine whether to include the child shape or not. This patch adds
children visibility tracking capability to group, and makes sure that
the group object will be marked for recomputation in case of any change
in group member, and their visibility status.

* Remove Prop_Output from 'Group' property.

* Added hidden property _GroupTouched to help propagate children change.

* Track children visibility change using signal

* GeoFeatureGroupExtension uses new PropertyLinkBase interface for
  scope checking.
2019-08-17 14:52:10 +02:00
Mateusz Skowroński
317bcd59c9 Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
plgarcia
792bb8282a Drags and drop with groups 2018-11-29 21:25:28 +01:00
wmayer
68bc663617 set parent widget to message box when asking user to delete content of a group 2018-09-21 14:41:52 +02:00
wmayer
dc54f67d03 fix infinite recursion in case of non-DAG documents 2018-08-06 18:52:48 +02:00
wmayer
a86a576d49 fix crash when closing drawing view 2018-03-07 11:41:23 +01:00
Stefan Tröger
6d40b1d646 Ensure viewprovider is shown after drop from claimChildren3D fixes #0003078 2017-09-09 16:47:07 +02:00
Stefan Tröger
2dc09c5e4d Tree: Adopt to special GeoFeatureGroup behaviours 2017-09-09 16:47:07 +02:00
wmayer
989fe4028e various fixes:
+ fix typos
+ fix const correctness
+ whitespace improvements
2017-06-19 17:18:16 +02:00
Stefan Tröger
8079cf43d2 Drag&Drop: Tree is responsible for undo/redo
The user expects to undo the drag and drop action with a single click (as it happens with a single drag&drop action). Hence the command must be handled by the tree, not the viewproviders.
2017-06-19 15:37:09 +02:00
Stefan Tröger
aa0d25f54f Groups: Handle add and remove object correctly 2017-06-19 15:37:09 +02:00
Chris Connett
9134a1e613 Grammar fix 2017-01-22 23:27:55 -05:00
Stefan Tröger
47ed29fffd Extensions: GeoFeatureGroup only for GeoFeature 2017-01-04 16:01:58 +01:00
wmayer
1a20ead8da fix typos & whitespaces 2016-12-21 11:19:54 +01:00
Stefan Tröger
1787a4f978 Extensions: Group fix for python 2016-12-04 19:50:42 +01:00
wmayer
09028b0a7f + fix -Wunused-parameter 2016-10-08 15:13:56 +02:00
wmayer
9ac1810ea3 Fix issues:
+ improve formatting
+ remove superfluous semicolons
+ comment unused parameters
+ rename Initialisation to Initialization
+ rename Deinitialisation to Finalization
+ remove spaces
2016-10-08 12:48:34 +02:00
Stefan Tröger
3a51404dd5 Extenions: Drop virtual inheritance
Due to problems onthe windows platform the virtual inheritance approach must be dropped. NExt to the already reimplemented proeprty interface the Type interface is reimplemented too. This change allows to revert some earlier changes.
2016-10-08 12:48:34 +02:00
Stefan Tröger
b101b11c67 Extensions: Fix rebase error 2016-10-08 12:48:34 +02:00
Stefan Tröger
22fa3b3922 Extension: Fix order-of-initialisation crash
FreeCADs property system utilises some pointer math to calculate the offset between
property and base class. Due to virtual inheritance of th ePropertyContainer the memory
layout has been changed to rather random, which has lead to crashes dependend on the
order of object initialisation.

The solution is to not make PropertyContaner virtual but a class below, Base::Persitance.
Then the memory layout is random for Persistance, but it is perfectly aligned for the
base class chains from PropertyContainer onwards as well as from Extension onwards.
Hence the proeprty system was changed to take the offset always from those two.
2016-10-08 12:48:34 +02:00
Stefan Tröger
ab692a4c08 Extensions: Fix visibility restore issue 2016-10-08 12:48:34 +02:00
Stefan Tröger
ed32752674 Extensions: Add ViewProvider extension python types 2016-10-08 12:48:34 +02:00
Stefan Tröger
261798da2e Extensions: Port ViewProvider of GeoFeatureGroup 2016-10-08 12:48:34 +02:00
Stefan Tröger
cd53eb2280 Remove redundant drag'n'drop interface
In the long time of parallel assembly development an own drag'n'drop interface has been added to master and assembly branch. After merge both have been available. This commit removes one and keeps the more extensive implementation
2016-10-08 12:48:34 +02:00
Stefan Tröger
0a539538de Extensions: Port ViewProvider of groups 2016-10-08 12:48:34 +02:00