Commit Graph

21 Commits

Author SHA1 Message Date
Kacper Donat
f71e84cad9 Gui: Fix handling - character in OVP 2025-05-12 08:55:09 -05:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Benjamin Nauck
17dc7fce06 Gui: Add #include <limits> where used 2025-03-31 23:50:37 +02:00
Benjamin Nauck
34bc1d45ea Gui: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
tritao
18d8c181a3 Gui: Fix invalid scene graph mutation in EditableDatumLabel.
`EditableDatumLabel` uses `activate`/`deactivate` methods for showing or
hiding its widgets in the scene.

However, `activate`/`deactivate` methods can end up being called as part
of a scene graph / Coin action (`SoAction`) handler, in the context of
`SoFCUnifiedSelection`, and this ended up in a Coin warning and eventual
crash due to the scene graph being manipulated (nodes being removed),
which Coin has checks for in debug mode:

```
Coin error in SoGroup::removeChild(): tried to remove non-existent child
0x5555579c5290 (Annotation)
```

Fix this issue by using a `SoSwitch` node instead and by controling the
child visibility using it instead.
2025-01-27 17:51:40 +01:00
Ladislav Michl
2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Abdullah Tahiri
0d221c0969 Sketcher: Fix lints 2023-11-08 17:46:34 +01:00
Abdullah Tahiri
4a7f71449d EditableDatumLabel: Extend with function to differentiate positioning from dimensioning OVPs 2023-11-08 15:20:13 +01:00
Paddle
fc472601e4 EditableDatumLabel : Fix issue where the spinbox would get in the way of the cursor for angle. For example line angle. 2023-11-07 15:36:21 +01:00
Paddle
f8be4d5f45 EditableDatumLabel : make sure the spinbox that has the focus is on top. 2023-11-07 15:36:21 +01:00
Paddle
e614b69866 EditableDatumLabel : prevent spinbox from going out of the view. 2023-11-07 15:36:21 +01:00
Paddle
0b7e8c80e1 EditableDatumLabel : prevent re-activation or re-startEdit. 2023-10-24 19:27:10 +02:00
Paddle
eff45035a7 Add a 'value' double to EditableDatumLabel such that we can store the raw value of the spinbox. For the case where editStopped but we still need to access value.
Also write the value in the SoDatumLabel in case we stopEdit.
2023-10-24 19:27:10 +02:00
Paddle
7f1fe0a3f7 EditableDatumLabel : Change the 'invisibleToMouse' to 'visibleToMouse' to avoid double negation.
Also add parameter to startEdit to set this setting. Defaulting to false. So that we don't have to set manually again and again in tool settings.
2023-10-24 19:27:10 +02:00
Paddle
98e4f840ac EditableDatumLabel add 'isInEdit' to check if the label is in edit. 2023-10-20 11:23:33 +02:00
Paddle
b3f8745d93 EditableDatumLabel add support for angle labels. 2023-10-20 11:23:33 +02:00
Paddle
4dbca6eab2 EditableDatumLabel : Prevent passing the focus with tab. And small thing. 2023-10-13 19:03:45 +02:00
Paddle
fa2b0c8f7c Adds SoDatumLabel::getLabelTextCenter() to get the externalize the finding of position of text center. 2023-10-13 19:03:45 +02:00
Paddle
3f1251df25 editableDatumLabel : add setSpinboxInvisibleToMouse 2023-10-13 19:03:45 +02:00
wmayer
4110a62c08 Gui: fix clang-tidy warnings in EditableDatumLabel
and fix two further memory leaks
2023-09-17 19:11:31 +02:00
Paddle
dc77391ebf Introduce EditableDatumLabel. A class that handles a SoDatumLabel with a spinbox to edit its value. 2023-09-17 13:05:53 +02:00