Fixed bug in BTextView reported by Matt:
* when selecting via mouse, the caret position now follows the direction of the selection - which is less surprising than not moving the caret at all git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30928 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4564,6 +4564,12 @@ BTextView::_PerformMouseMoved(BPoint where, uint32 code)
|
||||
break;
|
||||
}
|
||||
|
||||
// position caret to follow the direction of the selection
|
||||
if (fTrackingMouse->selEnd != fSelEnd)
|
||||
fClickOffset = fTrackingMouse->selEnd;
|
||||
else if (fTrackingMouse->selStart != fSelStart)
|
||||
fClickOffset = fTrackingMouse->selStart;
|
||||
|
||||
Select(fTrackingMouse->selStart, fTrackingMouse->selEnd);
|
||||
_TrackMouse(where, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user