Added missing test in wxObject::Ref() for already
equal objects (same m_refData). Implemented new ref counting for wxBrush, wxPen and wxColour (in addition to wxRegion). Also inlined some more functions and implemented real comparisons. Corrected refresh code to update GTK's window-less widgets if overdrawn after a wxWindow::Refresh(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -133,22 +133,22 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
|
||||
{
|
||||
return new wxRegionRefData(*(wxRegionRefData *)data);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxRegion comparison
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool wxRegion::operator==( const wxRegion& region )
|
||||
{
|
||||
if (m_refData == region.m_refData) return TRUE;
|
||||
|
||||
if (!m_refData || !region.m_refData) return FALSE;
|
||||
|
||||
// compare the regions themselves, not the pointers to ref data!
|
||||
return gdk_region_equal(M_REGIONDATA->m_region,
|
||||
M_REGIONDATA_OF(region)->m_region);
|
||||
}
|
||||
|
||||
bool wxRegion::operator != ( const wxRegion& region )
|
||||
{
|
||||
return !(*this == region);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxRegion operations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user