wxColour(const char *) ctor related modifications

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-10-20 14:35:22 +00:00
parent 9c1f7241c0
commit e4a81a2e96
35 changed files with 222 additions and 533 deletions

View File

@@ -121,28 +121,6 @@ wxColour& wxColour::operator = ( const wxColour& col )
return *this;
}
wxColour& wxColour::operator = ( const wxString& colourName )
{
UnRef();
wxNode *node = (wxNode *) NULL;
if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
if (col) Ref( *col );
}
else
{
m_refData = new wxColourRefData();
if (!gdk_color_parse( colourName, &M_COLDATA->m_color ))
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = (wxObjectRefData *) NULL;
}
}
return *this;
}
bool wxColour::operator == ( const wxColour& col )
{
return m_refData == col.m_refData;