don't call gtk_image_set_from_pixbuf() if no animation (part of patch 1586730)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-29 18:04:49 +00:00
parent 68aef14d9b
commit 98635ac64b

View File

@@ -350,12 +350,19 @@ void wxAnimationCtrl::DisplayStaticImage()
} }
} }
else else
{
if (m_anim)
{ {
// even if not clearly documented, gdk_pixbuf_animation_get_static_image() // even if not clearly documented, gdk_pixbuf_animation_get_static_image()
// always returns the first frame of the animation // always returns the first frame of the animation
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget),
gdk_pixbuf_animation_get_static_image(m_anim)); gdk_pixbuf_animation_get_static_image(m_anim));
} }
else
{
ClearToBackgroundColour();
}
}
} }
bool wxAnimationCtrl::IsPlaying() const bool wxAnimationCtrl::IsPlaying() const