Web results still show the details which include some metadata about the
image retrieved, for example.
This is now a setting so it can easily be re-enabled if desired (which
could be useful especially if we decide to also display metadata of
local items)
Distance between the last drawn point and the current point is
calculated to be able to discard very short stroke segments (i.e we only
add to the current stroke if the input device has moved more than a
certain distance since the last drawn point).
This commit moves this code from the stroke to the scene, which allows
to calculate distance more accurately: it is now calculated as the
total, absolute distance traveled since the last point, rather than simply the
length of a line between the last point and current one.
This solves an issue where erasing a stroke to the point that only one
(truncated) polygon was left resulted in this polygon reappearing after
reloading the document.
This should not affect any strokes containing more than one polygon.
Previously, items such as audio, video, and widget items could not be
cut and pasted because when the page was saved, any item that had been
deleted was permanently removed (including its source file, in the case
of these mulitmedia items).
This commit prevents the deletion any item in the undoStack
(i.e, items that have been deleted) when the document is persisted,
meaning the source file is still available when pasting the item on
another page (or document).
Note that this can lead to cases where the source file is kept in the
document even when no item is present. This should be a relatively rare
occurence, however.
This ensures that when part of a line is erased,
`UBGraphicsStroke::isNominalLine` will no longer return true. This was
problematic as `UBSvgSubsetAdaptor` uses this to know whether or not to
save a stroke as polyline.
If it saves the stroke as a polyline, then the erased portions of the stroke
reappear after saving.
Therefore, we now force saving of the stroke as a group of polygons when it
has been partially erased.
This mainly changes document mode behaviour in two ways:
1) When deleting 2+ items, a new document was selected in the list. Now, the current document is selected,
or if it has been deleted, a the first document in the list is set as
current document.
2) When deleting the last item in the trash, no document was selected.
Now, the current document is selected instead.