================================================================
In some DSHs instead of the convenience function, the code is being duplicated because
of the need to access the geometry after pushing it to the std::vector.
This commit leverages emplace_back return reference to improve code reuse.
This PR improves the behavior of the Draft grid:
* Options in the preferences: "Always show the grid" and "Show the grid during commands".
* The parameters are used for new views. In existing views the grid can be toggled either during a command or when no command is active.
* When switching to a different workbench all grids are hidden unless GridHideInOtherWorkbenches is set to `False`. This can be a Fine-tuning parameter IMO.
Notes:
* The defaultCameraHeight parameter becomes obsolete. It was only used in very specific circumstances.
* The code of PR #8818 becomes obsolete. It makes more sense to use `App.activeDraftCommand` instead of adding a `tool` argument to some functions. Will do some related cleanup later.
* Improved alignment for the related preference ui. The checkbox interaction has been fixed as well.
=================================================================
Instead of terminating the handler, as mandated before this PR by ViewProviderSketch, ViewProviderSketch
delegates the action to DrawSketchHandler.
DrawSketchHandler implements by default this terminating behaviour, but allows to override it.
DrawSketchDefaultHandler (and all tools deriving from it) implement as default behaviour to cancel if
in initial state, otherwise to reset.
===========================================================
Instead of terminating the handler, as mandated before this PR by ViewProviderSketch, ViewProviderSketch
delegates the action to DrawSketchHandler.
DrawSketchHandler implements by default this terminating behaviour, but allows to override it.
DrawSketchDefaultHandler (and all tools deriving from it) implement as default behaviour to cancel if
in initial state, otherwise to reset.