Fix wxRTTI for wxAnimationCtrl when using generic implementation

It must use wxGenericAnimationCtrl as the base class in wxRTTI, as
otherwise wxAnimation::IsCompatibleWith() would fail in this case for
the generic implementation of wxAnimation.
This commit is contained in:
Vadim Zeitlin
2020-04-06 23:15:18 +02:00
parent af7890e330
commit 135c959fe7

View File

@@ -43,7 +43,10 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxAnimation, wxObject);
#if !defined(wxHAS_NATIVE_ANIMATIONCTRL) #if !defined(wxHAS_NATIVE_ANIMATIONCTRL)
// In this case the "native" ctrl is the generic ctrl. See wx/animate.h // In this case the "native" ctrl is the generic ctrl. See wx/animate.h
wxIMPLEMENT_CLASS(wxAnimationCtrl, wxControl); // Notice that it's important to use wxGenericAnimationCtrl here because
// wxAnimation::IsCompatibleWith() relies on control deriving from
// wxGenericAnimationCtrl when using generic wxAnimation implementation.
wxIMPLEMENT_CLASS(wxAnimationCtrl, wxGenericAnimationCtrl);
#endif #endif
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"