New Alt+Arrow keys shortcuts for KRuler
ClosedPublic

Authored by gateau on Jun 19 2017, 9:21 PM.

Details

Reviewers
jriddell
gladhorn
Summary

This patch adds new keyboard shortcuts to KRuler: one can now use Alt+Arrow keys to move the mouse cursor. Combined with the existing Arrow keys shortcuts which moves the ruler it makes it easy to measure lengths precisely.

Test Plan
  • Start KRuler
  • Move the cursor over the ruler
  • Hold down Alt
  • Press the arrow keys => The cursor should move

Diff Detail

Repository
R375 KRuler
Lint
Lint Skipped
Unit
Unit Tests Skipped
gateau created this revision.Jun 19 2017, 9:21 PM
gladhorn added inline comments.
klineal.cpp
585

The call to update was seemingly not needed before (I guess it doesn't hurt), why introduce it here?

gateau added inline comments.Jun 21 2017, 4:49 PM
klineal.cpp
585

It was buggy before :) Moving the ruler window with the arrow keys did not update the length indicator.

update() is only needed when moving the window because the code does not call update() on move events, whereas moving the cursor triggers mouse events, which trigger update() calls.

Ping, do you think this can go in?

gladhorn accepted this revision.Jun 26 2017, 7:40 AM

Sure, add it. I didn't intend to block it, but the commit message didn't mention the bug fix (might be worthwile), I think this is certainly good, I don't know the code, you are much more likely to get it right Aurélien :)

This revision is now accepted and ready to land.Jun 26 2017, 7:40 AM
gateau closed this revision.Jul 2 2017, 8:01 AM

Merged in