Set the clear region to be the update region if the update
region is non-empty but the clear region is empty, because otherwise we're going to clear more than we repaint git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3454,6 +3454,14 @@ void wxWindowGTK::GtkSendPaintEvents()
|
|||||||
else
|
else
|
||||||
// if (!m_clearRegion.IsEmpty()) // always send an erase event
|
// if (!m_clearRegion.IsEmpty()) // always send an erase event
|
||||||
{
|
{
|
||||||
|
// If the clear region is empty, and the update region isn't,
|
||||||
|
// then we're going to clear more than we repaint,
|
||||||
|
// so let's make sure the two regions are in sync.
|
||||||
|
if (m_clearRegion.IsEmpty() && !m_updateRegion.IsEmpty())
|
||||||
|
{
|
||||||
|
m_clearRegion = m_updateRegion ;
|
||||||
|
}
|
||||||
|
|
||||||
wxWindowDC dc( (wxWindow*)this );
|
wxWindowDC dc( (wxWindow*)this );
|
||||||
dc.SetClippingRegion( m_clearRegion );
|
dc.SetClippingRegion( m_clearRegion );
|
||||||
|
|
||||||
|
@@ -3454,6 +3454,14 @@ void wxWindowGTK::GtkSendPaintEvents()
|
|||||||
else
|
else
|
||||||
// if (!m_clearRegion.IsEmpty()) // always send an erase event
|
// if (!m_clearRegion.IsEmpty()) // always send an erase event
|
||||||
{
|
{
|
||||||
|
// If the clear region is empty, and the update region isn't,
|
||||||
|
// then we're going to clear more than we repaint,
|
||||||
|
// so let's make sure the two regions are in sync.
|
||||||
|
if (m_clearRegion.IsEmpty() && !m_updateRegion.IsEmpty())
|
||||||
|
{
|
||||||
|
m_clearRegion = m_updateRegion ;
|
||||||
|
}
|
||||||
|
|
||||||
wxWindowDC dc( (wxWindow*)this );
|
wxWindowDC dc( (wxWindow*)this );
|
||||||
dc.SetClippingRegion( m_clearRegion );
|
dc.SetClippingRegion( m_clearRegion );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user