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
This commit is contained in:
Vadim Zeitlin
2006-11-12 22:16:58 +00:00
parent e9a4b51d27
commit 4683dc1c43

View File

@@ -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;
}