adjust code for what the original Intersect() usage probably meant

Daniel Bankston is right, the call probably meant to check whether
the intersection is not empty, as an optimization.
This commit is contained in:
Luboš Luňák
2012-04-03 13:51:18 +02:00
parent 94166f3c95
commit 248edba9de

View File

@@ -671,7 +671,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
} }
i = nIndex; i = nIndex;
aClip.Intersect(aRegion); aClip.Intersect(aRegion);
if( nAttr ) if( !aClip.IsEmpty() && nAttr )
{ {
Font aFont = GetFont(); Font aFont = GetFont();
if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE ) if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE )