From: Vadim Zeitlin Date: Mon, 9 Oct 2006 23:44:00 +0000 (+0000) Subject: fixed crash in wxColour ctor after RGBA-ization X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6304d5b49b488f7bc130c933bcece731ca10d4c7 fixed crash in wxColour ctor after RGBA-ization git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/cocoa/colour.h b/include/wx/cocoa/colour.h index c43b6e198e..c1bbc340ed 100644 --- a/include/wx/cocoa/colour.h +++ b/include/wx/cocoa/colour.h @@ -27,7 +27,16 @@ public: // default wxColour() { Init(); } - DEFINE_STD_WXCOLOUR_CONSTRUCTORS + + // the other standard ones: notice that we can't use + // DEFINE_STD_WXCOLOUR_CONSTRUCTORS here because we need to call Init() to + // initialize m_cocoaNSColor and the macro doesn't do it + wxColour( ChannelType red, ChannelType green, ChannelType blue, + ChannelType alpha = wxALPHA_OPAQUE ) + { Init(); Set(red, green, blue, alpha); } + wxColour(unsigned long colRGB) { Init(); Set(colRGB); } + wxColour(const wxString &colourName) { Init(); Set(colourName); } + wxColour(const wxChar *colourName) { Init(); Set(colourName); } // initialization using existing NSColor wxColour( WX_NSColor aColor );