From b2a271d29fdaf9444d16c982a216b655b7fb8834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 8 Apr 2009 22:50:35 +0000 Subject: [PATCH] Changing the text selection region calculation was not such a good idea, it needs more testing before I can do that, but in principle, I think the idea was an ok one... :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30048 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index b3e851513a..a8472d47be 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -2047,14 +2047,14 @@ BTextView::GetTextRegion(int32 startOffset, int32 endOffset, BRegion *outRegion) selRect.left = max_c(startPt.x, fTextRect.left); selRect.top = startPt.y; selRect.right = endPt.x - 1.0; - selRect.bottom = endPt.y + endLineHeight; + selRect.bottom = endPt.y + endLineHeight - 1.0; outRegion->Include(selRect); } else { // more than one line in the specified offset range selRect.left = max_c(startPt.x, fTextRect.left); selRect.top = startPt.y; selRect.right = fTextRect.right; - selRect.bottom = startPt.y + startLineHeight; + selRect.bottom = startPt.y + startLineHeight - 1.0; outRegion->Include(selRect); if (startPt.y + startLineHeight < endPt.y) { @@ -2062,14 +2062,14 @@ BTextView::GetTextRegion(int32 startOffset, int32 endOffset, BRegion *outRegion) selRect.left = fTextRect.left; selRect.top = startPt.y + startLineHeight; selRect.right = fTextRect.right; - selRect.bottom = endPt.y; + selRect.bottom = endPt.y - 1.0; outRegion->Include(selRect); } selRect.left = fTextRect.left; selRect.top = endPt.y; selRect.right = endPt.x - 1.0; - selRect.bottom = endPt.y + endLineHeight; + selRect.bottom = endPt.y + endLineHeight - 1.0; outRegion->Include(selRect); } }