Fix ambiguous shortcut warning when pressing save shortcuts
ClosedPublic

Authored by rkflx on Feb 12 2018, 5:45 PM.

Details

Summary

When Remember last used save mode is enabled, pressing
Ctrl+S or Ctrl++S repeatedly would result in a
ambiguous shortcut warning dialog.

This is because on every save the action was re-added to the dropdown
button, resulting in multiple shortcuts. It should be enough to set the
actions once, and then only swap the default action.

BUG: 389691

Depends on D10468
Ref T7841

Test Plan

Press Ctrl+S twice, no warning dialog is shown anymore.
Both Save options still work as before and the last-used button is
set as the default.

Diff Detail

Repository
R166 Spectacle
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rkflx requested review of this revision.Feb 12 2018, 5:45 PM
rkflx created this revision.
ngraham accepted this revision.Feb 13 2018, 4:32 AM
ngraham added a subscriber: ngraham.
ngraham added inline comments.
src/Gui/KSMainWindow.cpp
170

Technically this is an unrelated change, but these line breaks bug me too and I was planning to push a quick formatting fix at some point anyway (including turning all the tabs into spaces), so don't worry about it.

This revision is now accepted and ready to land.Feb 13 2018, 4:32 AM
This revision was automatically updated to reflect the committed changes.