Commit Graph

55 Commits

Author SHA1 Message Date
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
ae15d98fd3 Use is<T>() when possible 2025-01-27 16:08:18 +01:00
PaddleStroke
fa8b273f7d Merge branch 'main' into core_LCS3 2024-12-13 18:48:35 +01:00
mosfet80
29d685b452 Clean ViewProviderAssembly.cpp 2024-12-13 12:27:40 -05:00
PaddleStroke
024fee7f97 Assembly: Enable the use of App::Datums 2024-12-13 18:04:10 +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
Benjamin Nauck
e5c2c81685 Move back the assembly util functions to AssemblyUtil (#18020)
* Move back util functions to AssemblyUtils again

* Add getPropertyByName<T>() helper

* Improve constness in AssemblyUtils

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-02 10:48:48 -06:00
PaddleStroke
ef3445e9e1 Core / Assembly: Add a way for vp edit modes to be restored. 2024-11-29 12:04:25 -05:00
Kacper Donat
710542d121 Assembly: Refactor get/setDraggerPlacement
It seems that Base has very handy helpers for converting between various
types. This simplifies code of ViewProviderAssembly::get/setDraggerPlacement a
lot.
2024-11-25 12:27:35 -05:00
PaddleStroke
99b2f23214 Assembly: Fix joints not being deleted when subassembly is deleted. 2024-11-25 18:20:46 +01:00
PaddleStroke
979075ce0d Assembly: Pressing Esc while a task is active will not escape edit mode 2024-11-22 12:15:57 -05:00
wmayer
ae32212245 Assembly: Handle thrown Base::Exception in ViewProviderAssembly 2024-11-11 01:11:56 +01:00
PaddleStroke
761e5a43e8 Assembly: AssemblyLinks. 2024-10-16 15:39:23 +02:00
PaddleStroke
ad6d148935 Assembly: Fix context menu 'Activate object' not working and causing crash (#17092)
* Assembly: Add setupContextMenu to ViewProviderAssembly.h

* Assembly: Fix right click 'activate object' menu not setting edit

* add QMenu header

* Add NOLINT

* Add one more space before //NOLINT or clang cries...

* Fix isInEditMode

* add isInEditMode to ViewProviderAssemblyPy.xml

* add isInEditMode to ViewProviderAssemblyPyImp.cpp

* update activeAssembly() in Utils to make sure isInEditMode
2024-10-14 08:29:49 -05:00
PaddleStroke
bdfcb6bfb2 Assembly: Fix lag during dragging of large assemblies. Bundle fix joints together. Show only the movingJoint during dragging. Do not recompute joints during dragging. 2024-09-30 17:38:54 +02:00
Bas Ruigrok
e9fc6fb89a Move getGlobalPlacement from AssemblyObject to GeoFeature 2024-09-07 13:27:59 +02:00
Bas Ruigrok
5ed26f56f1 Move splitSubName from AssemblyObject to Base::Tools 2024-09-07 13:27:59 +02:00
PaddleStroke
7c6dde17fb Assembly: Fix case of link groups 2024-09-02 18:20:18 +02:00
PaddleStroke
79b9d45726 Assembly: Enable ungrounded connected parts to move as one item. 2024-09-02 18:20:18 +02:00
PaddleStroke
ece64bea29 Assembly: Make sure that when a components is deleted its joints are as well. 2024-08-12 11:43:54 -04:00
PaddleStroke
00ca22e2c5 Assembly: Fix bug where double-clicking on a joint would unselect the underlying edge. 2024-08-12 11:43:26 -04:00
PaddleStroke
a5505a1b1c Assembly: Replace ObjRefPairs std::pair by structure. 2024-07-29 17:48:25 +02:00
PaddleStroke
4f79c675b7 Assembly: Property change from Object/Part to Reference 2024-07-29 17:48:25 +02:00
PaddleStroke
2dc886d748 Assembly: define joint double click on 3dview (#15572)
* Assembly: define joint double click on 3dview

* Update string
2024-07-24 18:44:36 -05:00
PaddleStroke
e56f4a8c1a Assembly: Fix edit mode to allow users to transform the assembly. 2024-07-16 23:44:00 -05:00
Kacper Donat
284c42dc0a Gui: Reduce Transform Dragger size
Fixes: #13853
2024-07-15 10:57:19 -05:00
PaddleStroke
6088fdaa96 Assembly: Use canDragObjectToTarget in viewProviderAssembly 2024-07-15 17:53:02 +02:00
luzpaz
9a1f487cdb Fix various typos throughout the codebase 2024-07-08 17:19:20 -05:00
PaddleStroke
cf5314919a Assembly: Change Object1/2 from strings to PropertyXLinkSub and Remove Element1/2 and Vertex1/2 2024-07-01 11:22:30 -05:00
PaddleStroke
a0c4a273ba Assembly: Enable moving objects while making joints. 2024-06-27 09:10:38 +02:00
PaddleStroke
8913e3ffdc Assembly: Do not attempt to drag grounded objects. 2024-06-25 09:14:59 -05:00
PaddleStroke
55dd8076cc Assembly: deleting a component deletes its joints. 2024-06-17 10:58:11 -05:00
PaddleStroke
27f03e8edf Assembly: Makes sure deleting assembly deletes the joints, the exploded views and the view group. 2024-06-11 10:09:57 +02:00
wmayer
40b9c972c5 Assembly: Fix warning: -Wunused-variable 2024-05-07 19:48:33 +02:00
PaddleStroke
b5a6a26166 Assembly: Drag: switch from solver Solve to dragStep. 2024-05-06 18:32:00 +02:00
PaddleStroke
748ed561db Assembly: Adds limit and RackPinion/Screw/Gears 2024-05-06 18:32:00 +02:00
PaddleStroke
9115f31c84 Assembly: ViewProviderAssembly: Fix issues raised by @wwmayer 2024-05-06 18:32:00 +02:00
PaddleStroke
e37d15f081 Assembly: Improve dragging behavior. Fixes #13058 2024-05-06 18:32:00 +02:00
PaddleStroke
b59a743f6f Assembly: Remove Lock from labels and add lock to 3dView 2024-05-06 18:32:00 +02:00
PaddleStroke
0fa18820d8 Assembly: attach selection observer only if in edit mode. 2024-05-06 18:32:00 +02:00
PaddleStroke
c8128f19ee Assembly: Enable dragger when solid is selected. Fixes #12656 2024-05-06 18:32:00 +02:00
PaddleStroke
ef010e6f7c Assembly: define nested assemblies. Fixes 12440 2024-05-06 18:32:00 +02:00
PaddleStroke
6a834422e7 Assembly: Adds a dragger object to the assembly, so that assembly tools can access a dragger. 2024-05-06 18:32:00 +02:00
PaddleStroke
dc5f3bfe15 Assembly: Add drag mode for planar distances. 2024-05-06 18:32:00 +02:00
ppphp
c014ab7a4e fix: some unuse argument warning 2024-03-31 10:47:32 +02:00
PaddleStroke
51b81c1426 Assembly: Esc pref 2024-02-13 08:26:54 +01:00
Paddle
cdb1af6543 Assembly : Add support for perspective camera.
Remove exportASMT from toolbar.
Fix Fixedjoint name and tooltip
Fix various bugs
Introduce solver drag functions.
2024-02-13 08:25:46 +01:00
Paddle
46b1a1ebfc Assembly: set the rotating joint visible when dragging. 2024-02-13 08:25:46 +01:00
Paddle
d13df26333 Assembly: Adds a pre-solve when creating joint, preventing wrong orthogonal solutions from solver. 2024-02-13 08:25:46 +01:00
Paddle
48173f2b9d Assembly: Implement special drag mode for revolute. 2024-02-13 08:25:46 +01:00