fix Union(empty rect) bug

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-09-05 10:54:30 +00:00
parent c601df457c
commit 57351df0a6
2 changed files with 12 additions and 0 deletions

View File

@@ -185,6 +185,12 @@ void wxRegion::Clear()
bool wxRegion::Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{
// workaround for a strange GTK/X11 bug: taking union with an empty
// rectangle results in an empty region which is definitely not what we
// want
if ( !width || !height )
return TRUE;
GdkRectangle rect;
rect.x = x;
rect.y = y;

View File

@@ -185,6 +185,12 @@ void wxRegion::Clear()
bool wxRegion::Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{
// workaround for a strange GTK/X11 bug: taking union with an empty
// rectangle results in an empty region which is definitely not what we
// want
if ( !width || !height )
return TRUE;
GdkRectangle rect;
rect.x = x;
rect.y = y;