]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix incorrect event handler functions casts in wxRibbonPanel code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 2 Oct 2013 16:24:59 +0000 (16:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 2 Oct 2013 16:24:59 +0000 (16:24 +0000)
Use wxMouseEventHandler() instead of (wrongly) casting a method taking
wxMouseEvent to wxEvent-taking wxObjectEventFunction.

Closes #15550.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/ribbon/panel.cpp

index 18c2a5dad17af307e78c5e9364e8d0010295755c..fd354bf38fcf0f78f422fdeb1b00b45042e36ab2 100644 (file)
@@ -227,14 +227,14 @@ void wxRibbonPanel::AddChild(wxWindowBase *child)
     // for children of the window. The panel wants to be in the hovered state
     // whenever the mouse cursor is within its boundary, so the events need to
     // be attached to children too.
-    child->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)&wxRibbonPanel::OnMouseEnterChild, NULL, this);
-    child->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)&wxRibbonPanel::OnMouseLeaveChild, NULL, this);
+    child->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseEnterChild), NULL, this);
+    child->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseLeaveChild), NULL, this);
 }
 
 void wxRibbonPanel::RemoveChild(wxWindowBase *child)
 {
-    child->Disconnect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)&wxRibbonPanel::OnMouseEnterChild, NULL, this);
-    child->Disconnect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)&wxRibbonPanel::OnMouseLeaveChild, NULL, this);
+    child->Disconnect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseEnterChild), NULL, this);
+    child->Disconnect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxRibbonPanel::OnMouseLeaveChild), NULL, this);
 
     wxRibbonControl::RemoveChild(child);
 }