Check for invalid rects in BRegion::Include() and Exclude(). This fixes
weird text selection in BTextView() (for example, when an empty line was part of the selection). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24142 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e6fdb84b92
commit
748347fc20
@ -335,6 +335,9 @@ BRegion::Include(BRect rect)
|
||||
void
|
||||
BRegion::Include(clipping_rect rect)
|
||||
{
|
||||
if (!valid_rect(rect))
|
||||
return;
|
||||
|
||||
// convert to internal rect format
|
||||
rect.right ++;
|
||||
rect.bottom ++;
|
||||
@ -381,6 +384,9 @@ BRegion::Exclude(BRect rect)
|
||||
void
|
||||
BRegion::Exclude(clipping_rect rect)
|
||||
{
|
||||
if (!valid_rect(rect))
|
||||
return;
|
||||
|
||||
// convert to internal rect format
|
||||
rect.right ++;
|
||||
rect.bottom ++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user