Commit Graph

85 Commits

Author SHA1 Message Date
PaddleStroke
6d8953c3b0 Sketcher: Fix box selection regressions. And make addSelections Print to python (#26869) 2026-01-19 09:19:38 -06:00
tritao
40a9f46d71 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
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
Chris Hennes
9cd4a2ec7d Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
Syres916
37a0065d6d [Gui] Fix string coding on selection changed 2025-11-20 21:37:05 +00:00
pre-commit-ci[bot]
1197dc5cae [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:55:20 +00:00
Syres916
cb9f7a2f34 [Gui] Fix string encoding for preselect, select and deselect 2025-11-20 19:52:12 +00:00
pre-commit-ci[bot]
db69367544 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:22:23 +00:00
Syres916
bb0ed0b90d [Gui] Fix string encoding for document, object and subojects 2025-11-20 19:19:45 +00:00
pre-commit-ci[bot]
0e5491ca67 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-11 19:34:32 +00:00
Frank Martinez
fc99a20a03 [bindings] remove redundant signatures. batch1 2025-11-11 13:23:10 -05:00
Frank Martinez
0d0689341b [bindings] Format with yapf (precommit will reformat) 2025-11-11 13:23:10 -05:00
Frank Martinez
802f62739e [bindings] fix signatures in pyi files 2025-11-11 13:16:26 -05:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Syres916
18babc3089 [PartDesign] create a new Gui Unit Test for the creation of a sketch … (#23601)
* [PartDesign] create a new Gui Unit Test for the creation of a sketch and...

...improve the Selection Filter syntax error to show where it's being generated from.

* [PartDesign] address Lint feedback

* PD/Tests: Ensure test file does not exist before SaveAs

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-20 10:34:05 -05: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
Markus Reitböck
496b31b087 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
PaddleStroke
66e636f40d Core: Fix alpha-transparency issue in face color override. (#23532)
* Core: Fix alpha-transparency issue in face color override.

* Fix color picker opening wrongly with alpha reversed
2025-09-08 17:46:05 +02:00
PaddleStroke
527c7e8a6c Fix Link MaterialOverride 0.0 transparency bug 2025-09-07 17:33:52 +02:00
tetektoza
9565589f89 Gui: Handle proper naming for Link objects in Clarify Selection 2025-09-06 15:55:39 +02:00
tetektoza
0e15b6520e Gui: Skip creating submenu for Object and Other types in Clarify Select 2025-09-06 15:55:39 +02:00
tetektoza
7c090f6348 Gui: Remember right click position before menu pop-up for ClarifySelect 2025-09-06 15:55:35 +02:00
tetektoza
44a4825edf Gui: Add solid selection spport for top-lvl objects in pick menu 2025-09-05 02:24:53 +02:00
tetektoza
c67d9c529c Gui: Align to use translated strings in SelectionView 2025-09-05 01:52:16 +02:00
tetektoza
350eb6d3d4 Gui: Add variable names for grouping thresholds in SelectionView 2025-09-05 01:41:51 +02:00
tetektoza
91a77e89ba Gui: Replace usage of dynamic_cast with freecad_cast in SelectionView 2025-09-05 01:03:50 +02:00
tetektoza
9b4e21287b Gui: Use cleaner variable naming for menu items in SelectionView 2025-09-05 01:00:37 +02:00
tetektoza
a19d6f0fee Gui: Use assignment in if statement for menus iterator 2025-09-05 00:49:24 +02:00
tetektoza
6b3b3d230f Gui: Convert Clarify Selection usage in SelectionSingleton to instance 2025-09-05 00:48:02 +02:00
tetektoza
2190d7dd3b Gui: Use copy for currentSelections in Clarify Selection tool 2025-09-03 01:24:58 +02:00
tetektoza
9329767039 Gui: Use QStringLiteral for selected element 2025-09-03 01:24:58 +02:00
tetektoza
85526db81a Gui: Fix typo in SelectionView 2025-09-03 01:24:58 +02:00
tetektoza
b780cf923f Part/Gui: Rename Pick Geometry tool to Clarify Selection
Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:58 +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
tetektoza
59b234028f Core: Add preselect on hovered menu items in PickGeometry tool
Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:57 +02:00
realthunder
ce8ba74602 Gui: Add a context menu to select obstructed items (from RT fork)
As the title says, this is from RT's fork. I only adjusted it a little
bit and removed pie selection which was previously in the
implementation.

To activate context menu - "G, G", then if it can't resolve edges vs
faces, it adds QMenus on top to let user decide which one to select.

Co-authored-by: tetektoza <tetektoza@users.noreply.github.com>
2025-09-03 01:24:57 +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
PaddleStroke
2f970a7135 Link: MaterialOverride: fix transparency inversion 2025-08-30 16:32:23 +02:00
xtemp09
887e7bd595 Simplify repr() function 2025-08-25 10:38:39 -05:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
Syres916
39dc1e6210 [Gui] C++ preparation for deprecation of QCheckBox…
…stateChanged -> checkStateChanged
2025-06-13 10:40:48 +02:00
Chris Hennes
c0ddaf4820 Gui: Remove default init of shared_ptr
`std::shared_ptr` default-initializes to `nullptr`, so there is no need
to do it manually, and in the current code the initialization is in the
wrong order (so generates a compiler warning).
2025-05-12 18:16:32 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Chris Hennes
f55063855a Merge pull request #20540 from 3x380V/cleanup-schemas-management
Simplify UnitsSchemas management
2025-05-05 10:43:27 -05:00
Benjamin Nauck
df3c324b7d Gui: use contains() and isEmpty() instead of count() where possible 2025-05-03 22:19:51 +02:00