This creates new method overload for changing layer of exact
ElementItem. This fixes strange behavior of the checkboxes for elements
that were dependent not on what user clicked but on what is selected.
Fixes: #8814
This commit like previous one introduces ability to style list of
elements in the sketcher. It also completely refactors the rendering
delegate introducing dedicated method for calculating rects of each
element and method for rendering each sub control. Thanks to this
refactor we can be sure that areas drawn are the same as areas checked
for events in editorEvent.
This adds reference to the actual widget to the painting of Constraints
List control of Sketcher. Thanks to this this list can now be styled
using standard mechanisms of Qt framework like QSS.
This ensures that checkboxes drawn in the Elements UI of the sketcher
can be styled using the correct style.
Three changes are introduced:
1. paint() method uses style provided by the widget, not application.
2. Indicator is drawn using PE_IndicatorCheckBox not CE_CheckBox - it
allows to use ::indicator in qss to style it properly. This works the
same as TreeView.
3. Fix for minor issues with text alignement and extension of selected items
background to cover checkbox. This is how other controls of this kind
work.
Additionally 2 Arch_Window bugs were fixed:
* If the W1 value was changed the box tracker was not repositioned relative to the cursor.
* The WindowColor was not applied because of a typo in the code. De current default color is quite dark BTW.
Note that all dimensional values that were not really defaults, but just the last entered values, have been removed from preferences-archdefaults.ui. As a result the layout looks a bit strange. That will be improved in a next PR.
In a previous PR of mine I have reorganized some lines of code in DraftGui.py without realizing that this would reposition checkboxes. This PR fixes that.
Renamed to makeElementCompound and modified as little as possible to get it to compile in the new framework. All required auxilliary methods are also brought in.
Issue 8064 occurs when FreeCAD passes a Voronoi diagram to
Boost that becomes self-intersecting when Boost truncates the
diagram's coordinates to integers. This occurs when the discretizer
slightly misses closing the polygon generated for the letter by less
that FreeCAD's epsilon, then the wrapping Python code closes the
polygon by adding the initial polygon point as the final point.
This creates a short segment that, depending on the position of
the letter in the coordinate system, may end up being moved one
Boost coordinate delta away from the intended point, which can
end up self-intersecting.
Since the miss is very small, FreeCAD should treat it as it it
were the initial point. There's no need for a duplicate copy of
the initial point, so we remove this point close to the initial
point and let insert_many_wires() close the polygon as usual.
In realthunder's original version this class was not derived from TopoDS_Shape, but rather duplicated
its interface and wrapped its non-const methods. This resulted in quite a lot of boilerplate, so in
the merged implementation we are now deriving from TopoDS_Shape and only overriding the non-const
methods. The downside is that if OCCT adds or changes methods we will have to add them proactively
to this class so that they don't bypass the TNP code.
The function would trigger the creation of duplicate Draft Polar Arrays (only on Linux and only if the Fuse option is selected and the Link Array option deselected).
Forum topic:
https://forum.freecad.org/viewtopic.php?t=84090
The reapply_diffuse_color function is no longer required anyway as Issue #8340 has been fixed.