Commit Graph

20 Commits

Author SHA1 Message Date
tetektoza
91933f7f42 Gui: Respect parent container selectability in nested selections 2025-12-26 13:55:02 +01:00
tetektoza
8294b34006 Gui: Respect Selectable property for objects inside Part containers
Currently if user selects object with `Selectable=false` property which
is nested inside a Part container, for example `Part->Body->Pad`, parent
Part container will get highlighted in the 3D view, even though the user
clicked on a non-selectable child object.

Cause of that is that tree view's `getTopParent()` function resolves
nested objects selections to their top-level container. When a Pad
inside Part is selected, `SoFCUnifiedSelection` was only checking Part's
`isSelectable()` status, even though the target is `Pad`.

So the fix is to resolve subname to get the final target object and
checks its `isSelectable()` status before checking for highlighting.
2025-12-26 12:46:07 +01:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
0a1ed6e541 Updated SPDX License Identifiers 2025-10-08 16:39:12 -05:00
Markus Reitböck
a72a0d6405 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
PaddleStroke
527c7e8a6c Fix Link MaterialOverride 0.0 transparency bug 2025-09-07 17:33:52 +02:00
tetektoza
c856c9ea01 Core/Gui: Render primitives on top of the scene in PickGeometry
+ added some better grouping for items, which are assigned per object
  right now. For example, if we exceed 10 items per object it gets an
  additional group.

Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:58 +02:00
Kacper Donat
cac32c4d3c Revert "Gui: Mark mouse move action handled to skip digging nodes"
This reverts commit ccb417e00d.
2025-09-01 05:33:02 +02:00
tetektoza
98e653fc9f Core: Do not clear highlight if filter rejected selection
When user has specified a filter for a multi selection attempt, for
example Ctrl + clicking on a disallowed edge, the visual highlighting of
previously selected valid objects (that filter allowed) would disappear,
even though they were still internally valid in selection system.

The root cause of that was that when `addSelection()` failed, the code
still applied a `SoSelectionElementAction::None` to the scene graph
path, which was clearing visual highlighting for all objects in that
path, including those valid selection.

So, the fix is to set `pPath` to `nullptr` if selection fails, to
prevent any visual action from happening and being applied, in essence
leaving correct (and existing) selection untouched.
2025-08-31 17:23:26 -05:00
Kohei Takahashi
da32a949f2 Gui: Mark mouse move action handled to skip digging nodes 2025-08-31 22:09:32 +02:00
Luz Paz
6564a7b107 Fix various typos 2025-03-14 12:37:12 -04:00
Joao Matos
80d4cf9f40 Gui: Remove QtOpenGL.h. 2025-02-25 23:03:51 +00:00
Joao Matos
c3e5069190 Gui: Cleanup Qt OpenGL usings in QtOpenGL.h.
Previously the code defined compatiblity usings in `QtOpenGL.h` header,
which I think was added for backwards compatiblity with previous Qt
OpenGL widgets.

As far as I can tell, this is not necessary anymore, and can be cleaned
up.
2025-02-25 23:03:51 +00:00
tritao
1d789a7972 Gui: Rename SoFCHighlightAction to preselect terminology. 2025-02-05 13:14:00 +00:00
tritao
e79b5ff9e8 Gui: Rename SoFCEnableHighlightAction to preselection terminology. 2025-02-05 13:14:00 +00:00
tritao
cb9e166a20 Gui: Some SoFCUnifiedSelection code readability improvements. 2025-02-05 13:13:59 +00:00
tritao
2792a83a19 Gui: Change SoFCUnifiedSelection from highlight to preselection terminology. 2025-02-05 13:13:59 +00:00
tritao
988315d768 Gui: Cleanup SoFCUnifiedSelection::handleEvent. 2025-02-05 00:25:56 +00:00
tritao
589ff46a58 Gui: Rename SoFCUnifiedSelection::selectionRole for clarity. 2025-02-05 00:25:56 +00:00
tritao
551c2e48fb Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00