Commit Graph

72 Commits

Author SHA1 Message Date
wmayer
5d11b2938f Gui: Replace calls of FCMD_SET_EDIT with Gui::cmdSetEdit 2025-05-30 18:04:33 +02:00
Kacper Donat
a86c300688 Gui: Disable Show Placement for Body Features 2025-04-13 17:54:01 +02:00
Kacper Donat
b300c80b90 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Kacper Donat
35a9673a75 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
Karliss
fa61131590 Add missing parent for messagebox and other popups
Unparented popups can easily get lost in backround, but they still block top level event loop when run with ::exec() thus preventing interactions with main window.  This mainly happens on wayland. Setting the parent ensures they are always kept on top and reasonably positioned.
2025-03-16 16:02:36 -05:00
Benjamin Nauck
dd6aa9f3c7 Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
Kacper Donat
a3bf63bae2 PD: Forward transform requests to Body 2025-01-04 16:32:52 +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
3e33f184b4 Core: Rename ViewProviderPythonFeature to ViewProviderFeaturePython
Fixes #15888
2024-08-26 18:14:22 +02:00
wmayer
351397e088 PD: Replace helper functions in subclasses of TaskDlgFeatureParameters with a template function 2024-07-18 00:02:07 +02:00
Max Wilfinger
6ca8b2daae update hardcoded XPMs to .svg files. Updated .svg icons for clarity. 2024-03-30 11:25:13 +01:00
Florian Foinant-Willig
677cadee5e PD: Use SuppressibleExtension 2024-02-29 18:24:27 +01:00
Florian Foinant-Willig
6adc675a12 PartDesign: modernize type checking 2023-10-23 18:08:16 +02:00
wmayer
5686149cd3 PD: modernize C++: use default member init 2023-08-23 00:55:03 +02:00
wmayer
ca1cb21498 PD: modernize C++: use equals default 2023-08-22 13:31:17 +02:00
berniev
915369d8a2 Mod: Redundant_string_initialization 2022-08-08 16:52:42 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
697e88aed6 [PD] remove more superfluous nullptr checks 2022-07-18 01:33:28 +02:00
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
414ac4cb7d [PD] ViewProvider: remove unused includes 2022-02-17 04:43:16 +01:00
Uwe
aa02ab5c66 [Part] add context menu icon for color face
- the other context menu entries have icons and we use this icon already in the View menu

- also sort the includes
2022-02-17 03:20:31 +01:00
wmayer
8df497b08e Gui: move methods startDefaultEditMode() and addDefaultAction() to ViewProviderDocumentObject 2021-12-06 19:24:26 +01:00
0penBrain
7aef0b3de7 [Gui] UserEditMode : fix operating on PartDesignObject 2021-12-03 16:53:30 +01:00
wmayer
45c3cee264 PD: open transaction when calling item of context-menu of sketch based features 2021-10-22 20:01:43 +02:00
wmayer
d39233313b PD: [skip ci] code cleanup 2021-10-22 19:06:57 +02:00
Abdullah Tahiri
87c9f83bd6 Gui: Colorful/Greyable overlay status in icons
===============================================

Before this implementation, specific status via former mergeOverlayIcon() was greyed out
with the visibility.

With this commit, the developer has two options:

a) override mergeGreyableOverlayIcons, in which case the overlay will
be greyed out when the item is greyed out as per former mergeOverlayIcon()

b) override mergeColorfulOverlayIcons, in which case the overlay will
be superimposed after the icon is greyed out as it is the case for stardard
error and recompute flags.
2021-01-06 13:54:00 +01:00
wmayer
691f259042 Part: allow to open attachment editor via context-menu 2020-11-15 19:16:22 +01:00
wmayer
d0d92b0801 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
Zheng, Lei
11a93a0578 PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
Abdullah Tahiri
85c37aa6c0 PartDesign Gui: Extend ViewProvider with Part::ViewProviderAttachExtension 2019-06-23 01:03:36 +02:00
Abdullah Tahiri
2ac5707072 PartDesign: Refactor set/remove tip in the new Gui::ViewProvider mechanism 2019-06-23 01:03:35 +02:00
wmayer
f581d5c8cb PVS: V560 A part of conditional expression is always true 2019-02-17 13:56:48 +01:00
wmayer
7acdb56d92 Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wmayer
3653d7ed11 fixes 0003148: PartDesign does not allow colouring of single faces for non-primitives 2018-09-24 19:30:36 +02:00
wmayer
707bbee6ae fix warning: lambda capture 'this' is not used [-Wunused-lambda-capture] 2018-02-10 12:42:41 +01:00
wmayer
a33ac38508 disable tip handling in PD view providers when start or finish editing 2018-02-10 00:46:30 +01:00
wmayer
337619f245 make green for tip a bit darker 2018-02-01 19:30:25 +01:00
Abdullah Tahiri
758745f0be PartDesign: Highlight body tip
==============================

It generates a small green icon on the treeview for those features being the tip of the body.
2018-02-01 19:15:48 +01:00
Abdullah Tahiri
f64760b8a3 PartDesign: OnDelete basefeature fixing and visualization
=========================================================

fixes #3084
fixes #3061 (at least what it is understood in the analysis as being a bug, the visualization left).

Basically when deleting a feature, if it is the base feature (feature with which it will merge or cutout), the dependent objects'
base feature is made to be the base feature of the object being deleted. This code pre-existed at body level, but was not being called (see below).

Additionally, if the visible object is not the one being deleted, we leave that one visible. If the visible object is the one
being deleted, we make the previous object visible.

Deletion from the tree of a feature is handled by Document.removeObject, which has no clue about what a body is. Therefore, Bodies, although an
'activable' container, know nothing about what happens at Document level with the features they contain.

The Deletion command StdCmdDelete::activated, however does notify the viewprovider corresponding to the feature (not body) of the imminent deletion
(before actually doing it). Consequently, the only way of notifying a body of the imminent deletion of one of its features so as to do the clean up
required (moving basefeature references, tip management) is from the viewprovider of the feature being deleted.
2018-01-22 22:03:18 +01:00
luzpaz
56af703746 Fix Techdraw UI typo found via crowdin + misc. typos
Ref: https://crowdin.com/translate/freecad/27911/en-eu#6503377
2017-11-26 15:48:20 +01:00
Stefan Tröger
f1c307dc28 PartDesign: Boolean must show the operation result, not the children. fixes #0003184 2017-09-21 10:48:38 +02:00
DeepSOIC
1ee6dcf75e PartPesign: Py: expose some methods of ViewProvider
* setBodyMode(bool)
* makeTemporaryVisible(bool)
2017-03-04 19:16:39 -03:00
DeepSOIC
0160478242 PartDesign: add ViewProviderPython
+ bind PartDesign::Feature to PartDesign::ViewProvider, and adjust
viewprovider of PartDesign::FeaturePython accordingly.
2017-03-04 19:16:39 -03:00
Stefan Tröger
9a3b952fb9 PartDesign: Port body to be a origin group 2017-01-04 16:01:58 +01:00
wmayer
7004081805 avoid to create a circular dependency when modifying an existing pad or pocket operation 2016-12-28 17:05:20 +01:00
Sergo
ef14bbd88a PartDesign: fix showing base object on newly opened file, cleanup 2016-09-30 11:09:01 -03:00
Stefan Tröger
8b0d53358a PartDesign: Adopt primitive preview
The preview was developed when the "one feature only" visibility rule was not yet introduced. This commit maks it work again.
2016-04-12 18:12:23 +02:00
Stefan Tröger
048c374080 PartDesign: body is responsible for visuals
-Hide all visual properties of features when they are part of a body
-Propagate all body visual changes to features
-Separate display mode from body mode to enable setting display mode for both "tip" and "through" modes
-Use default visuals for body shape and only make "through" a new display mask mode for the children
2016-04-12 18:12:23 +02:00
Stefan Tröger
4164f8fc4c Ensure only a single PartDesign feature is visible 2016-04-12 18:12:22 +02:00