check whether clipping region is empty, not whether it's null; disable USE_PAINT_REGION which seems to be more harmful than useful (part of patch 1716763)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,7 +41,8 @@
|
|||||||
// local defines
|
// local defines
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#define USE_PAINT_REGION 1
|
// VZ: what is this for exactly??
|
||||||
|
#define USE_PAINT_REGION 0
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// local data
|
// local data
|
||||||
@@ -2171,13 +2172,13 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo
|
|||||||
rect.width = XLOG2DEVREL(width);
|
rect.width = XLOG2DEVREL(width);
|
||||||
rect.height = YLOG2DEVREL(height);
|
rect.height = YLOG2DEVREL(height);
|
||||||
|
|
||||||
if (!m_currentClippingRegion.IsNull())
|
if (!m_currentClippingRegion.IsEmpty())
|
||||||
m_currentClippingRegion.Intersect( rect );
|
m_currentClippingRegion.Intersect( rect );
|
||||||
else
|
else
|
||||||
m_currentClippingRegion.Union( rect );
|
m_currentClippingRegion = rect;
|
||||||
|
|
||||||
#if USE_PAINT_REGION
|
#if USE_PAINT_REGION
|
||||||
if (!m_paintClippingRegion.IsNull())
|
if (!m_paintClippingRegion.IsEmpty())
|
||||||
m_currentClippingRegion.Intersect( m_paintClippingRegion );
|
m_currentClippingRegion.Intersect( m_paintClippingRegion );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2203,13 +2204,13 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion& region )
|
|||||||
|
|
||||||
if (!m_window) return;
|
if (!m_window) return;
|
||||||
|
|
||||||
if (!m_currentClippingRegion.IsNull())
|
if (!m_currentClippingRegion.IsEmpty())
|
||||||
m_currentClippingRegion.Intersect( region );
|
m_currentClippingRegion.Intersect( region );
|
||||||
else
|
else
|
||||||
m_currentClippingRegion.Union( region );
|
m_currentClippingRegion = region;
|
||||||
|
|
||||||
#if USE_PAINT_REGION
|
#if USE_PAINT_REGION
|
||||||
if (!m_paintClippingRegion.IsNull())
|
if (!m_paintClippingRegion.IsEmpty())
|
||||||
m_currentClippingRegion.Intersect( m_paintClippingRegion );
|
m_currentClippingRegion.Intersect( m_paintClippingRegion );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user