Docs.
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:
@@ -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
|
||||
|
@@ -2582,7 +2582,6 @@ bool wxWindow::SetBackgroundColour( const wxColour &colour )
|
||||
}
|
||||
|
||||
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
|
||||
|
||||
if (sysbg == m_backgroundColour)
|
||||
{
|
||||
m_backgroundColour = wxNullColour;
|
||||
@@ -2621,7 +2620,7 @@ bool wxWindow::SetForegroundColour( const wxColour &colour )
|
||||
}
|
||||
|
||||
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
|
||||
if (sysbg == m_foregroundColour)
|
||||
if ( sysbg == m_backgroundColour )
|
||||
{
|
||||
m_backgroundColour = wxNullColour;
|
||||
ApplyWidgetStyle();
|
||||
|
Reference in New Issue
Block a user