In the Elements context menu (Sketcher task panel) the menu text for Sketcher_ToggleConstruction is "Toggle construction line", this should be "Toggle construction geometry". It is not just lines that can be toggled, and this is also the menu text in the main Sketcher menu.
================================================
This should fix this (I cannot reproduce it):
https://forum.freecad.org/viewtopic.php?p=667579#p667579
Lately I added the geometry pointer to the item. This has indeed
the potential for an already deleted pointer being accessed.
This PR removes the geometry pointer from the item and relies on the
ViewProvider to indirectly access an updated pointer.
====================================================================================
As reported:
https://forum.freecad.org/viewtopic.php?p=667426#p667426
Support for moving external geometry to another layer will come in the future.
============================================================
This class needs quite some rework, as it is mixing model-view model and item model.
Eventually, the whole needs to be moved to a QTreeWidget for layers' implementation.
This commit:
1. Moves back implementation only class item to the cpp file.
2. Adds a contextual submenu to change the selection from one layer to another in the
naive fixed 3 layer implementation.
3. Adds checkboxes to hide geometry.
It is the minimal modification to enable a user work with the 3 layer implementation.
* QString::indexOf() is now marked as [[nodiscard]]
* QApplication::fontMetrics() is deprecated, use the constructor of QFontMetricsF
* fix -Wunused-result
* fix -Wunused-but-set-variable
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Unused QString [-Wclazy-unused-non-trivial-variable]
* Missing emit keyword on signal call [-Wclazy-incorrect-emit]
* Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
* Use multi-arg instead [-Wclazy-qstring-arg]
* Maybe you meant to call ViewProvider2DObjectGrid::onChanged() instead [-Wclazy-skipped-base-method]
=============================================================================================
This commits removes the Geometry construction data member and adapts sketcher code to use
GeometryFacade to access construction information via the SketchGeometryExtension.
`Sketcher_ConstrainBlock` to `Constraint_Block`.
`Sketcher_ConstrainLock` to `Constraint_Lock`, and the corresponding
`_Driven` variant.
Adjust the icons in the taskpanel for the sketcher constraints,
elements, and for the action menu for constraints.
Adjust the icon order in the `Sketcher.qrc` resource file.