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
This commit is contained in:
@@ -2047,14 +2047,14 @@ BTextView::GetTextRegion(int32 startOffset, int32 endOffset, BRegion *outRegion)
|
|||||||
selRect.left = max_c(startPt.x, fTextRect.left);
|
selRect.left = max_c(startPt.x, fTextRect.left);
|
||||||
selRect.top = startPt.y;
|
selRect.top = startPt.y;
|
||||||
selRect.right = endPt.x - 1.0;
|
selRect.right = endPt.x - 1.0;
|
||||||
selRect.bottom = endPt.y + endLineHeight;
|
selRect.bottom = endPt.y + endLineHeight - 1.0;
|
||||||
outRegion->Include(selRect);
|
outRegion->Include(selRect);
|
||||||
} else {
|
} else {
|
||||||
// more than one line in the specified offset range
|
// more than one line in the specified offset range
|
||||||
selRect.left = max_c(startPt.x, fTextRect.left);
|
selRect.left = max_c(startPt.x, fTextRect.left);
|
||||||
selRect.top = startPt.y;
|
selRect.top = startPt.y;
|
||||||
selRect.right = fTextRect.right;
|
selRect.right = fTextRect.right;
|
||||||
selRect.bottom = startPt.y + startLineHeight;
|
selRect.bottom = startPt.y + startLineHeight - 1.0;
|
||||||
outRegion->Include(selRect);
|
outRegion->Include(selRect);
|
||||||
|
|
||||||
if (startPt.y + startLineHeight < endPt.y) {
|
if (startPt.y + startLineHeight < endPt.y) {
|
||||||
@@ -2062,14 +2062,14 @@ BTextView::GetTextRegion(int32 startOffset, int32 endOffset, BRegion *outRegion)
|
|||||||
selRect.left = fTextRect.left;
|
selRect.left = fTextRect.left;
|
||||||
selRect.top = startPt.y + startLineHeight;
|
selRect.top = startPt.y + startLineHeight;
|
||||||
selRect.right = fTextRect.right;
|
selRect.right = fTextRect.right;
|
||||||
selRect.bottom = endPt.y;
|
selRect.bottom = endPt.y - 1.0;
|
||||||
outRegion->Include(selRect);
|
outRegion->Include(selRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
selRect.left = fTextRect.left;
|
selRect.left = fTextRect.left;
|
||||||
selRect.top = endPt.y;
|
selRect.top = endPt.y;
|
||||||
selRect.right = endPt.x - 1.0;
|
selRect.right = endPt.x - 1.0;
|
||||||
selRect.bottom = endPt.y + endLineHeight;
|
selRect.bottom = endPt.y + endLineHeight - 1.0;
|
||||||
outRegion->Include(selRect);
|
outRegion->Include(selRect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user