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:
Oliver Tappe
2009-05-30 17:27:03 +00:00
parent f06f5d708c
commit 4b6aea9b74
+6
View File
@@ -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);