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.
* this is a workaround to remove caps
pelase ignore this hackery
* And now the caps are gone
* a bunch of small tweaks and fixes.
* Update FreeCAD Light.qss
updated menubar color light theme
* updated the buttons a tiny bit
* Fix for to short buttons.
Couldn't test it since my macro window is broken.
Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>
* qspinbox disabled tweaks.
* Update FreeCAD Dark.qss
Tweaked the buttons a bit so they are more in line with the light theme.
* Update FreeCAD Dark.qss
small tweaks
* reversed the spreadsheet headers gradient for dark
* Update light with undo arrows position
Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>
* Update undo buttons arrow position dark
Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>
* added an offset to qcombobox
* removed the fix since it ruined every Qcombobox.
* Tabs update more clean less gradients.
* Update DlgMacroExecuteImp.cpp
fixing conflicts
* Update DlgMacroExecuteImp.cpp
* Delete DlgMacroExecuteImp.cpp
* Create DlgMacroExecuteImp.cpp
* Revert "Create DlgMacroExecuteImp.cpp"
This reverts commit 8de8f7506177d773bb356fd0e22a66466c25b668.
* Revert "Delete DlgMacroExecuteImp.cpp"
This reverts commit 41315f31abdad79afd4b696ee15c603de3e4a6a1.
* Revert "Update DlgMacroExecuteImp.cpp"
This reverts commit aa792291684e2d674f6961c641c8e2f8b9af12c8.
* Revert "Update DlgMacroExecuteImp.cpp"
This reverts commit e8376a8fdf11d7fd014f2c46f189afdca42833ce.
* Delete src/Gui/DlgMacroExecuteImp.cpp
* Update DlgMacroExecuteImp.cpp
finally realized what was going on lol
---------
Co-authored-by: Syres916 <46537884+Syres916@users.noreply.github.com>
When in console mode, some messages from CLI interaction still resulted
in popup dialogs, e.g. the response from `--help` or `--version`. This
is becasue those information are communicated via exceptions and those
exceptions prevented the console mode from being properly set.
By using a scope guard the console mode flag is now evaluated in all
cases. The code to display those messages got refactored into dedicated
methods which now also take care of console mode.
* Mods to accommodate tool order in Gcode. Some controllers want T# M6 others want M6 T#. Masso wants T# M6.
Added file refactored_masso_g3_post.py (based on refactored_linuxcnc_post.py) and modified UtilsParse.py
* Added tests and additional comments
* Working on the testing framework
* Tried to make refactored linux and masso as compatable line by line to support fil diffing
* A space in the file name caused all sorts of grief ... Thanks Larry
* added files to , swapped tool order in testrefactored_masso
* Added note regarding how files are "clones" of one another
* Added space in comment line for consistent formatting.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated formatting and comments
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixed documentation and confusing variable name
* Prepare for joined wall fix
* Fixed invalid Part::Sweep on certain joined walls
* Calculate the Length in case of a curved segment
* Adding Arch::Space for each room, and group furnitures in these spaces
* Fixed baseboard import
* Add baseboard to Space and wall to Space.Boundaries
* Fixed space attribution when importing furniture as Arch::Equipment
* Adding site properties
* Allow creation of reference ground mesh
* Make sure get_space takes level into account
* Added sh3dCreateGroundMesh preferences
* Sensible ordering for import preferences
* Move furniture at least up to the floor upper facewq
* Avoid gap between floors. Adjusted wall height and furniture placement
* Preparing to allow model_rotation attribute in furniture
* Fixed tipo in model_rotation
* Make space upper face does exists
* Use Facebinder to paint walls. do not offset by floor thickness.
* Use Draft.make_facebinder()
* Workaround for issue #19172. Refreshing the list of Faces and removing the extra '?' character
* The updateSnapper function did not work properly.
* Added display_point_active attribute to prevent the displayPoint function from triggering the changeXValue etc. functions. This would lead to a loss of accuracy as the rounded displayed values would be read from the inputboxes.