X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5b433042029ef76123aee26dc90744bd940fa7f..404b319a85dadd7decf7a5a5331020520031a41c:/src/generic/clrpickerg.cpp?ds=sidebyside diff --git a/src/generic/clrpickerg.cpp b/src/generic/clrpickerg.cpp index 843dc86750..ffc71547ad 100644 --- a/src/generic/clrpickerg.cpp +++ b/src/generic/clrpickerg.cpp @@ -58,7 +58,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id, } // and handle user clicks on it - Connect(wxEVT_COMMAND_BUTTON_CLICKED, + Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxGenericColourButton::OnButtonClick), NULL, this); @@ -83,7 +83,7 @@ void wxGenericColourButton::InitColourData() void wxGenericColourButton::OnButtonClick(wxCommandEvent& WXUNUSED(ev)) { - // update the wxColouData to be shown in the the dialog + // update the wxColouData to be shown in the dialog ms_data.SetColour(m_colour); // create the colour dialog and display it @@ -105,7 +105,7 @@ void wxGenericColourButton::UpdateColour() dc.SetPen( *wxTRANSPARENT_PEN ); dc.SetBrush( wxBrush(m_colour) ); dc.DrawRectangle( 0,0,m_bitmap.GetWidth(),m_bitmap.GetHeight() ); - + if ( HasFlag(wxCLRP_SHOW_LABEL) ) { wxColour col( ~m_colour.Red(), ~m_colour.Green(), ~m_colour.Blue() ); @@ -113,7 +113,7 @@ void wxGenericColourButton::UpdateColour() dc.SetFont( GetFont() ); dc.DrawText( m_colour.GetAsString(wxC2S_HTML_SYNTAX), 0, 0 ); } - + dc.SelectObject( wxNullBitmap ); SetBitmapLabel( m_bitmap ); }