Commit Graph

46 Commits

Author SHA1 Message Date
Kacper Donat
707ee60d64 Gui: Fix transform of link sub-elements 2025-09-22 11:17:04 -05:00
captain0xff
2cab5e7b64 Gui: refactor gizmo attachment code 2025-09-17 15:46:35 +02: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
Kacper Donat
69a60a1b08 Gui: Use no_except=true for getExtensionByType in ViewProviderDragger
Fixes: #22166
2025-06-25 12:54:11 +02:00
Kacper Donat
d35b638039 Gui: Use proper placement property for Link
Links require different placement property (LinkPlacement) to be used,
otherwise it breaks the transform.

Fixes: #20776
2025-06-22 23:04:06 -05:00
Max Wilfinger
9d1360fc8d Gui: Fix dragger update when moving to target object and make flip independent of selected components. 2025-06-11 20:58:47 +02:00
Max Wilfinger
0386189c51 Advanced options for move to other object in the transform tool.
Allows for masking of individual translation or rotation axes.
2025-06-08 16:18:01 +02:00
captain0xff
101da159ec Gui: rename TaskCSysDragger to TaskTransform 2025-04-28 23:30:14 +02:00
captain0xff
7f5b1c9f2c Gui: moved dragger classes to separate folder and files
* renamed SoFCCSysDragger to SoTransformDragger
* moved TDragger, RDragger and TPlanarDragger to separate files and also renamed them to be more descriptive
2025-04-13 21:36:54 +02:00
Kacper Donat
a86c300688 Gui: Disable Show Placement for Body Features 2025-04-13 17:54:01 +02:00
Kacper Donat
5dc2ba40ea Gui: Hide Placement Indicator with object 2025-04-13 17:54:01 +02:00
Kacper Donat
2a4c7bc0b5 Gui: Ensure that placement indicator is always on top 2025-04-13 17:54:01 +02:00
Kacper Donat
2ee47b4f1d Gui: Add Show Placement utility 2025-02-24 17:30:27 +01: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
wmayer
cb4dd89d55 Fix several compiler warnings 2025-01-14 13:34:18 -06:00
Kacper Donat
62cdaaff56 Gui: Zero out rotation only if more than 1 axis changed 2025-01-04 16:32:52 +01:00
Kacper Donat
a3bf63bae2 PD: Forward transform requests to Body 2025-01-04 16:32:52 +01:00
Kacper Donat
fab235682d Gui: Make ViewProviderLink based on ViewProviderDragger 2025-01-04 16:32:52 +01:00
Kacper Donat
1df3b5be6c Gui: Rework TaskCSysDragger into new Transform Dialog
This commit refactor ViewProviderDragger and TaskCSysDragger to be more
modern and to support selecting TransformOrigin.
2025-01-04 16:32:52 +01:00
Kacper Donat
284c42dc0a Gui: Reduce Transform Dragger size
Fixes: #13853
2024-07-15 10:57:19 -05:00
qewer33
4c39dcb347 Gui: Transform dragger fix lint warnings 2023-09-19 21:04:25 +03:00
qewer33
8d4a01318b Gui: Transform dragger fixes 2023-09-19 18:24:19 +03:00
qewer
420f099946 Gui: Transform dragger improvements (#10706)
* Gui: Improve transform dragger appereance

* Gui: Implement axis color parameters

* Gui: Implement plane draggers for the Transform tool

* Gui: Clean comments in Transform dragger files
2023-09-18 10:34:26 -05:00
didendron
2351219559 Gui: Add cancel button to transform task UI dialog
Fixes #7517
2023-09-04 16:43:27 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
2de08f77b7 Use View3DInventorViewer::setSelectionEnabled instead of SoFCUnifiedSelection::selectionRole 2023-05-04 08:03:11 +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
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
f706adc2c2 [Gui] ViewProviderDocument* etc.: remove unused includes 2022-03-06 00:01:37 +01:00
Uwe
bf07e0752e [Gui] ViewProviderDragger: add missing include 2022-02-17 04:35:10 +01:00
Uwe
fa08936b3a [Gui] ViewProviderDragger: remove unused includes
- also sort them
2022-02-17 04:13:53 +01:00
Uwe
c17f118976 [Gui] add context menu icon for Std_TransformManip
- the other context menu entries have icons and we use this icon already in the Edit menu

- also sort the includes
2022-02-17 03:49:02 +01:00
luz paz
4f886b2b8c Fix various typos and refinements 2022-01-06 20:22:34 +01:00
luz paz
74ab516494 Gui: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the src/Gui code.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
31ff1921ce Gui: [skip ci] add method extensionSetupContextMenu to extension view provider 2020-11-08 13:36:31 +01:00
Zheng, Lei
1cbec1a60d Gui: fix Std_Transform tool
The problem is caused by tracking of editing object placement
introduced in 719c11e714.

After this commit, any editing object can disable placement tracking by
calling Gui::Document::setEditingTransform() inside either
ViewProvider::startEditing() or setEditingViewProvider().
2019-12-21 15:17:48 +01:00
luz.paz
0f67e8ddfa Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
00bcef0619 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
wmayer
4b468ebed1 call updateData of base class for ViewProviderDragger and ViewProviderGeometryObject 2019-07-02 12:08:23 +02:00
wmayer
8f3a53c24c move check for grabbed node and releasing it from ViewProviderDragger::unsetEditViewer to View3DInventorViewer::resetEditingViewProvider 2018-09-11 17:27:17 +02:00
wmayer
fd2befe7a7 when leaving dragger edit mode make sure to release the grabbed node 2018-09-06 12:42:08 +02:00
wmayer
f3f857fc8d fix possible crash with draggers in transform edit mode of a view provider 2018-03-18 10:11:35 +01:00
wmayer
0973dd5e7b add class ViewProviderDragger
derive ViewProviderGeometryObject from ViewProviderDragger
derive ViewProviderPart from ViewProviderDragger
2017-11-26 15:42:57 +01:00