Fix bug: select browse tool after trim select

Currently, there is the following bug: If we use "Trim To Selection" and make a selection, we get the correctly trimmed page, but the cursor is still in a "Trim To Selection" state.

The reason seems to be the following: After the selection is done, d->aMouseNormal->trigger(); is called ( However, d->aMouseNormal is still checked, since the trim tool is not in the d->mouseModeActionGroup (it just changes d->mouseMode). Hence, the toggled() signal is not called.

I am not sure, what is the best way to fix this bug. Also, Okular::Settings::EnumMouseMode::TrimSelect is the only mouse mode, which does not correspond to an action in d->mouseModeActionGroup. Maybe one should add such an action?

Btw, there seem to be several other issues in pageview.cpp:

Edited by Gerd Wachsmuth

Merge request reports