Nux

Merge lp:~robertcarr/nux/fix-selection-clear into lp:nux

Proposed by Robert Carr
Status: Merged
Merged at revision: 483
Proposed branch: lp:~robertcarr/nux/fix-selection-clear
Merge into: lp:nux
Diff against target: 19 lines (+7/-2)
1 file modified
Nux/TextEntry.cpp (+7/-2)
To merge this branch: bzr merge lp:~robertcarr/nux/fix-selection-clear
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
Review via email: mp+76997@code.launchpad.net

Description of the change

Fix clearing of selection on cursor move. In particular we want to be able to clear the selection by pressing right at the end of the selection (as in bug: https://bugs.launchpad.net/ayatana-design/+bug/841828)

To post a comment you must log in.
Revision history for this message
Jay Taoko (jaytaoko) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Nux/TextEntry.cpp'
2--- Nux/TextEntry.cpp 2011-09-21 16:10:17 +0000
3+++ Nux/TextEntry.cpp 2011-09-26 15:09:23 +0000
4@@ -1698,8 +1698,13 @@
5 ResetImContext();
6 int new_cursor = 0;
7 // Clear selection first if not extend it.
8- if (cursor_ != selection_bound_ && !extend_selection)
9- SetCursor(cursor_);
10+ if (!extend_selection)
11+ {
12+ selection_changed_ = true;
13+ cursor_moved_ = true;
14+ selection_bound_ = cursor_;
15+ cursor_moved.emit (cursor_);
16+ }
17
18 // Calculate the new offset after motion.
19 switch(step)

Subscribers

People subscribed via source and target branches