This can easily go into GuiTests.py but we tend to keep it out due to
usage of create_from_metadata(). All widget in GuiTests uses
create_from_class() which will not work for this special widget
Whenever user would click on the map (e.g. to identify a feature),
the freeze and subsequent unfreeze would force map refresh even though
it is not needed. A new internal flag is introduced to avoid
the unnecessary map refresh in cases when map has not been moved nor zoomed.
Often when users want to click (tap) the map, they still move the cursor
position a bit. This would trigger unwanted map pan and map refresh afterwards.
A configurable minimum drag distance is introduced in order to prevent that.
* [vertex tool] rename mSelectedFeature to mLockedFeature
* also rename file and class
* remove uselesss method, move code to constructor
and initialize in header
* followup rename
When user was coming with mouse to a vertex of the locked feature
from a different feature, it could happen that the vertex would not
get picked by vertex tool - this was because snapToEditableLayer()
keeps the last snap which would belong to a different feature, but
that feature was not allowed (blocking a new snap).
The fix makes sure that with a locked feature its matches always win.
A small UX improvement: after right click in a location with feature A and B,
we would do a loop A - B - nothing - A - B - nothing ...
But if after first click to get A locked user would move the mouse a bit,
the loop would get broken and would end up with A - nothing - B - nothing - A - B - nothing
The fix is to identify where we are in the cycle and set the index correctly after mouse move.
It was a bit strange effect when locking feature... when moving mouse
over a feature it would have highlight, then on right click it would
also get vertex editor square markers in addition to the highlight, but
then immediately after mouse move the original highlight would be gone.
Now it's simplified so that feature highlight on right click gets removed.
* fixes#20516 : Allow Constraint widget in attribute type form to be empty so expression could be removed
per widget modification
* correct tests
* Add the clear button on field expression widget when widget is allowed to be empty
* Change API since version to 3.6