This patch adds/changes a couple of things:
* if you press enter on a label now, it moves you to another label and
adds the label and lock on the previous label, instead of previous behavior
where it was accepting whole dimension
* if you press enter and have lock state on both labels then you move to
next stage
* if you press ctrl+enter it's as is if you'd press enter on both labels
(the object becomes constrained with whatever dimensions that were in
both labels)
* tab still works the same way
* you can remove "Lock" state from the label by typing something
additional or removing the dimension at all
Currently if user tries to reset OVP, they can only do that by entering
"0" for example, and then the parameters will get unset in
unsetOnViewParameter. But that will only happen if user types a value
that's under confusion point (typically 1e^-7). In my opinion, it would
be cool to reset that state if user deletes all content in the label, to
allow them to specify coordinates with mouse once again.
Also, this patch fixes a regression with backspace, where deleting stuff
from OVP was working on unix systems, but seems like on Windows it
doesn't pass the check.
* Sketcher: Do not allow mouse interruption while entering dimensions
So, currently user has an option to enter dimensions to different
Sketcher elements like circle, line, or hexagon, whatever else. But, if
they move mouse during entering of those parameters, they are gone.
This is because we are currently allowing for constant
`QAbstractSpinBox` value change during mouse move, it stops changing
ONLY AFTER value is being set (user enters number and presses ENTER
or TAB).
So, this patch introduces one more state for `EditableDatumLabel` which
is `hasFinishedEditing` which is being triggered by ENTER or TAB key,
and still keeping old `isSet` state, which disallows mouse movement
disruption and dynamically updates the edited element on viewport.
This means, that all objects now wait for `hasFinishedEditing` state to
actually finish editing.
* Sketcher: Avoid out of boundary access by checking onViewParameters size
* Sketcher: Add missing Qt headers for CI
* Sketcher: Allow using TAB to switch between labels without accepting
* Sketcher: Change to or statement, so enter will accept both labels
* Sketcher: Apply review comments
* used casting directly in if statement and auto to keep linter happy
* added comments for flags used for describing EditableDatumLabel states
`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.