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:
@@ -288,7 +288,6 @@ bool wxAnimationCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxAnimation& animation, const wxPoint& pos,
|
const wxAnimation& animation, const wxPoint& pos,
|
||||||
const wxSize& size, long style, const wxString& name)
|
const wxSize& size, long style, const wxString& name)
|
||||||
{
|
{
|
||||||
m_animation = animation;
|
|
||||||
m_timer.SetOwner(this);
|
m_timer.SetOwner(this);
|
||||||
|
|
||||||
if (!base_type::Create(parent, id, pos, size, style, wxDefaultValidator, name))
|
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
|
// by default we get the same background colour of our parent
|
||||||
SetBackgroundColour(parent->GetBackgroundColour());
|
SetBackgroundColour(parent->GetBackgroundColour());
|
||||||
|
|
||||||
|
SetAnimation(animation);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user