Skip to content
Commit f0edb69f authored by Huon Imberger's avatar Huon Imberger
Browse files

Disable View mode shortcuts outside of View mode

Summary:
The document view zoom actions like {nav Zoom to Fit} only apply to
{nav View} mode.
In the case of {nav Zoom to Fit}, the default keyboard shortcut is
{key F}, which interferes with single-letter keypresses in {nav Browse}
mode (to skip to files starting with that letter).

There is an existing function that enables or disables these {nav View}
mode actions based on whether `ViewMainPage` is visible, however this
function isn't called when leaving {nav View} mode. This patch ensures
that these actions are updated when `ViewMainPage` is reset, ensuring
these actions are disabled when {nav View} mode is not active.

Test Plan:
Ensure default {key F} shortcut for {nav Zoom to Fit} is set.
Go to {nav Browse} in a folder containing at least one image starting with F.
Press {key F} - selection to jump to that image.
Go to {nav {View}, and ensure {key F} triggers {nav Zoom to Fit}.
Go back to {nav Browse} and ensure {key F} still works as previously.

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: ngraham, rkflx

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D11633
parent dd0d608a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment