* 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
* CAM: Fix finishing pass
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add finishing pass unit (by @baehr)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
eliminate some error messages when a Job is not fully loaded
(or when not properly constructed via scripting)
TESTED ON V0.21 -- code hasn't changed since then
`EditableDatumLabel` uses `activate`/`deactivate` methods for showing or
hiding its widgets in the scene.
However, `activate`/`deactivate` methods can end up being called as part
of a scene graph / Coin action (`SoAction`) handler, in the context of
`SoFCUnifiedSelection`, and this ended up in a Coin warning and eventual
crash due to the scene graph being manipulated (nodes being removed),
which Coin has checks for in debug mode:
```
Coin error in SoGroup::removeChild(): tried to remove non-existent child
0x5555579c5290 (Annotation)
```
Fix this issue by using a `SoSwitch` node instead and by controling the
child visibility using it instead.