* Draft: Draft_Fillet: fix error in #17945
In #17945 the delete option of the command results in an error if subobjects are selected.
* Command should not be available if there is no selection
* Update copyright notice
Fixes#16210.
Note that `Draft.format_object` is called from gui_split.py (in the commit). This is not consistent with other tools where this is handled in the `make_*` functions. In this case the new object is formatted twice. The 1st time by the `make_wire` code which (wrongly) applies the current default props.
Fixes#16249.
The input did receive the focus, but the existing value was not selected.
The circle, arc, trim and offset tools had a related issue. The whole radius/distance value, including the unit string, was selected, instead of just the numerical portion.
* [Draft gui_stretch] Improve Stretch Rectangle Behaviour
Feature Improvement discussed at FreeCAD Forum :
- https://forum.freecad.org/viewtopic.php?t=92124#p792118 (Draft_Stretching the whole rectangle creates a new wire)
Currently, 3 cases in general, proposed PR improve Case 3 below :
1. The original object is a Rectangle, if after stretching it is no longer a rectangle, it makes a copy turning it into a Wire which reflect the result of stretching.
- Current behanviour is good for user, no change.
2. If after stretching it is still a rectangle, the code just resize the original.
- Current behanviour is good for user, no change.
3. Now, if the user 'stretch' the whole rectangle, the code creates a copy as DWire in the 'stretched location'.
** - Users find this not intuitive, better just move the whole rectangle.
* For the human figure attached to the Draft grid a hard-coded point list is used (instead deriving the points from human figure.brep). This is more efficient and avoids a dependency on the BIM WB.
* The default for the human figure preference of the grid was changed to false. And the tooltip adjusted.
* BIM: Optimized leader UI - fixes#17284
* Correct task panel icon for BIM Leader.
* Make BIM Leader task panel title translatable.
* Use a single mode parameter for the Line class.
---------
Co-authored-by: Roy-043 <info@b-k-g.nl>
* Draft: Fix AnnotationStyleEditor delete last style error
Fixes#17716.
* Fix rename problem as well
The on_rename function should update self.current_style as well. To avoid this scenario:
1. Create style A.
2. Create style B.
3. Rename style B to C.
4. Switch to style A.
5. Press OK.
6. Start the tool again.
7. Result: there are 3 styles A, B and C.
This fixes a regression introduced in V0.19 (!) when the type of linear dimensions was changed from "Dimension" to "LinearDimension".
Forum topic:
https://forum.freecad.org/viewtopic.php?t=90292
Selecting an edge or vertex of a solid was not handled properly. The tool does not support these subelements, but the code did not call self.finish() is such cases.
* Draft: Fix cursor scaling
The get_cursor_with_tail function was rewritten to match the Sketcher cursor code. Hopefully this fixes the scaling issue.
Related issue:
#13696
Related forum topic:
https://forum.freecad.org/viewtopic.php?t=89494
@maxwxyz
Can you check if this code fixes the issue? Apart from the size the 'hot' pixel should be checked. If you approach a vertical line from the left or right it should get highlighted at the same distance.
Fixes#14823.
Depending on the order and location of the picked points, the Placement of the Box could be unexpected. The Height value was always positive if points were picked, a negative Height entered in the input box would lead to errors.
Additonally:
* Avoided some code duplication.
* Added a proper transaction to make the command undoable.
#13778 introduced `self.obj.ViewObject.ShowInTree = False` to hide the temporary object. But objects that are hidden in the tree are displayed in the tree when they are selected in the 3D view. This selection occurs during commands that take more than 2 points. The solution is to change `self.obj.ViewObject.Selectable` on mouse button up/down.
Fixes#13700.
If you change the grid color in the preferences and cick the Apply button, the color of all grids is updated now. So you can experiment while the Preferences Editor is open.
I have kept but moved the grid color button in the Draft_SelectPlane task panel for now. So that both options can be tested.