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:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user