]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/clrpickerg.cpp
don't access inexistent column in wxDataViewTreeCtrl::OnSize() (this bug also probabl...
[wxWidgets.git] / src / generic / clrpickerg.cpp
index 80de3e15a64d06b34a107e1c1235a2b8e10e8361..b17a9f38afdb0365275c4001c6602af8e86fb95c 100644 (file)
@@ -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);
 
@@ -105,15 +105,15 @@ 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) )
+
+    if ( HasFlag(wxCLRP_SHOW_LABEL) )
     {
         wxColour col( ~m_colour.Red(), ~m_colour.Green(), ~m_colour.Blue() );
         dc.SetTextForeground( col );
         dc.SetFont( GetFont() );
         dc.DrawText( m_colour.GetAsString(wxC2S_HTML_SYNTAX), 0, 0 );
     }
-    
+
     dc.SelectObject( wxNullBitmap );
     SetBitmapLabel( m_bitmap );
 }