From 4683dc1c43055df89b6a70457e62a61b4a812f4e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Nov 2006 22:16:58 +0000 Subject: [PATCH] call SetAnimation() from the ctor instead of just assigning m_animation directly to ensure that UpdateBackingStoreWithStaticImage() is initially called git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/animateg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index 4f793eac48..c7e55f4f92 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -288,7 +288,6 @@ bool wxAnimationCtrl::Create(wxWindow *parent, wxWindowID id, const wxAnimation& animation, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { - m_animation = animation; m_timer.SetOwner(this); if (!base_type::Create(parent, id, pos, size, style, wxDefaultValidator, name)) @@ -296,6 +295,9 @@ bool wxAnimationCtrl::Create(wxWindow *parent, wxWindowID id, // by default we get the same background colour of our parent SetBackgroundColour(parent->GetBackgroundColour()); + + SetAnimation(animation); + return true; } -- 2.45.2