]> git.saurik.com Git - wxWidgets.git/commitdiff
disconnect "toggled" signal in dtor when style has wxALIGN_RIGHT
authorPaul Cornett <paulcor@bullseye.com>
Mon, 26 Nov 2012 18:30:08 +0000 (18:30 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Mon, 26 Nov 2012 18:30:08 +0000 (18:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/checkbox.h
src/gtk/checkbox.cpp

index 26db70bcba73b6839af52eb0752342f731fa7b8f..d9edb0a356ff7351e9a63845d334e932dbc048c0 100644 (file)
@@ -18,6 +18,7 @@ class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase
 {
 public:
     wxCheckBox();
+    ~wxCheckBox();
     wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
             const wxPoint& pos = wxDefaultPosition,
             const wxSize& size = wxDefaultSize, long style = 0,
index 6c21e580a27d6a4dfd9575b0e2fcd108b857c927..21c4159d59d8706ef0be389452196c7141f22050 100644 (file)
@@ -91,6 +91,13 @@ static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
 
 wxCheckBox::wxCheckBox()
 {
+    m_widgetCheckbox = NULL;
+}
+
+wxCheckBox::~wxCheckBox()
+{
+    if (m_widgetCheckbox && m_widgetCheckbox != m_widget)
+        GTKDisconnect(m_widgetCheckbox);
 }
 
 bool wxCheckBox::Create(wxWindow *parent,