Fix DialogEd XOR's.
  Colour does proper RGB value comparison.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-06-10 16:21:23 +00:00
parent 566a4f58b7
commit 2b62ab3575
7 changed files with 90 additions and 32 deletions

View File

@@ -118,7 +118,18 @@ wxColour& wxColour::operator = ( const wxColour& col )
bool wxColour::operator == ( const wxColour& col ) const
{
return m_refData == col.m_refData;
if (m_refData == col.m_refData) return TRUE;
if (!m_refData) return FALSE;
if (!col.m_refData) return FALSE;
GdkColor *own = &(((wxColourRefData*)m_refData)->m_color);
GdkColor *other = &(((wxColourRefData*)col.m_refData)->m_color);
if (own->red != other->red) return FALSE;
if (own->blue != other->blue) return FALSE;
if (own->green != other->green) return FALSE;
return TRUE;
}
bool wxColour::operator != ( const wxColour& col) const