Fixes 2 cases where we could get stuck in an exepected state:
- if onHold would get us nothing to act on, we would stay stuck
in "hold" state (until a next hold) and taps for page turn
would not work
- if text selection would get us some text (ie. some punctuation)
that would be stripped to an empty string, we would just not
do the lookup, but the selection would stay: best to do that
lookup and get a "no result" window, that when closed would
do the normal cleanup.
Fix annotation import to preserve notes, filter by type, deduplicate,
map drawer, and delete originals from PDF after import.
Closes#15075. Depends on koreader-base#2287.
* refactor onStopHighlightIndicator so it returns early
* stop text selection when opening menus or triggering hotkeys
* use self.ui.highlight (naturally)
* remove duplicated setDirty
We may happen to have an empty selection while panning,
no reason to abort the selection yet before release.
Also add get_segments=true to remaining calls to
getScreenBoxesFromPositions() that we forgot to
update to use it.
Long-pressing on the "edit" buttons switches between "word" and "char" modes of the following single taps.
Long-pressing always moves the boundary by char.
Initially, when you open the dictionary widget from the reader, FocusManager will function as usual. On Kindle 4 or devices with a keyboard, I have assigned the shortcuts <kbd>screenkb</kbd> + <kbd>up</kbd>/<kbd>down</kbd> or <kbd>shift</kbd> + <kbd>up</kbd>/<kbd>down</kbd> to initiate text selection (as a remainder, on kindle text selection in reader is initiated with <kbd>up</kbd>/<kbd>down</kbd> so it is fairly similar). At this point, FocusManager is disabled, allowing the cursor keys (and press) to control the now-visible crosshairs. Pressing <kbd>back</kbd> should stop text selection and restore FocusManager’s control of the widget.