This commit mollifies the issue #17684 by making the PrefWidgets receive
mouse wheel events only when they have both focus and the mouse pointer
at the widget.
* remove unused else
* Enable reloading / re-selection of libraries
* Reload the libraries when exiting the editor
* Clear the model to prevent duplicate entries
* add missing docstring to reduce linting warnings
* Maintain any previous library selection when editing
* Draft: allow objects in layers to have overrides
Fixes#17844.
1. When an object is put in a layer it always adopts the properties of that layer.
2. Properties of the object that are subsequently changed are considered overrides.
3. When the properties of the layer, or the object in the layer, are then changed so that they match again, there is no longer an override, and properties are synced again.
4. The layer and the layer container object get an extra Tree view context menu option "Reassign properties of layer"/"Reassign properties of all layers".
The current Draft_Layer.svg icon shows multiple layers. It is used for the Draft_Layer command but also for the LayerContainer. This is confusing. There should be separate icons, one with a single layer and one with multiple layers.
Fixes issue #19121 "dimension numbers placed lower than normal".
Problem:
QGCustomText has a new method `alignmentRect` which can optionally return a
`tightBoundingRect` instead of the regular `boundingRect`. The
`alignmentRect` is used for laying out the `QGIDatumLabel`, however
QGraphicsItemGroup's `childrenBoundingRect` use the childrens'
`boundingRect` and knows nothing of `alignmentRect`. The result is an
improperly sized label and frame and miss alignment. Additionally
`childrenBoundingRect` calculations includes hidden views, so even though
the `m_tolTextOver` and `m_tolTextUnder` are hidden they still affect
the bounding rect size.
Solution:
1. Implement new method `QGIDatumLabel::tightBoundingRect` this
calculates the bounding rect using the subview's
`aligmentRect` if there is text in the custom text.
2. Use `tightBoundingRect` in place of `boundingRect` to for the drawing of
arrows and the exact dim frames.
3. This PR acknowledges that there are some edge case fonts that while not
clipped may not interface perfectly with arrows and the exact dimension
frame.
4. Fix vertical alignment of `m_tolTextOver` / `m_tolTextUnder`
5. Incorporate PR Review comments