From b1314bbca4233fba86c43e11476ec6e8c47a6272 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Oct 2015 12:21:15 +0200 Subject: [PATCH] Fix display of PNG images in wxHTML when GIF is disabled Too much code was taken in "#if wxUSE_GIF" check, move Layout() out from it to make PNG images work even if GIF support is disabled. Closes #17181 --- src/html/m_image.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index d16040fc77..27e0f93977 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -304,9 +304,10 @@ public: #if wxUSE_GIF && wxUSE_TIMER void AdvanceAnimation(wxTimer *timer); - virtual void Layout(int w) wxOVERRIDE; #endif + virtual void Layout(int w) wxOVERRIDE; + private: wxBitmap *m_bitmap; int m_align; @@ -538,6 +539,7 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer) delay = 1; timer->Start(delay, true); } +#endif void wxHtmlImageCell::Layout(int w) { @@ -571,10 +573,10 @@ void wxHtmlImageCell::Layout(int w) } wxHtmlCell::Layout(w); +#if wxUSE_GIF && wxUSE_TIMER m_physX = m_physY = wxDefaultCoord; -} - #endif +} wxHtmlImageCell::~wxHtmlImageCell() {