* Fix bug preventing filtering named constraints
There was a bug (see issue #11843) that displayed a filter for Named
constraints in the Sketcher Workbench whose toggling did not affect the
UI in any way. This enables this feature by checking if a given
constraint has a custom name or not and then appropriately toggling its
visibility.
* Use `std::string::empty()` per reviewer suggestion
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
* Auto scroll to constraint on click
When clicking on a contrasint in Sketcher, that constraint is now
automatically scrolled to in the Constraints listview. If selecting
multiple constraints, the last one is scrolled to.
Closes#17361
* Check model() for nullptr
* scrollTo only on select, not de-select #18859
* Sketcher mapping error fix
Fixed an issue in the Sketcher where attempting to create a sketch while a group is selected caused a mapping error. Now, when a sketch is created with a group selected, the sketch will be placed inside the group.
* Update to use new templated countObjectsOfType
This commit updates the code to use the new templated version of countObjectsOfType, aligning with recent changes in the main branch.
---------
Co-authored-by: Joona <jookkone@edu.lapinamk.fi>
This should be a `protected` or `private` operation since it doesn't handle
constraints. However, this is intended to be used by external classes that
modify a `SketchObject` (instead of these modifications like `split`, `trim`,
`join` etc. being methods of `SketchObject`). In that case, it may be best to
use the `friend` keyword.
Fixes fails at cases where one (or both) of the remaining segments is (are)
degenerate. This existed pre-refactor.
Fixes cases where there are some constraints on internal geometry that do not
get deleted cleanly.
Also fixes a memory leak.
* Use range-for and rearrange for understandability.
* Break down into individual functions by geomtype.
* Also refactor `exposeInternalGeometryForType<Part::GeomBSplineCurve>`
* Use `Constraint::involves...()` in delete internal
Suppress clang-tidy/clazy warnings by using `[[maybe_unused]]`.
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>