]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_image.cpp
reset the tooltip text before changing it, this apparently prevents a spurious redraw...
[wxWidgets.git] / src / html / m_image.cpp
index 80d6dba87b7092945582ef8fa69d9d4b75dd3855..43904eac7856f20e531add622d95910c9ba2f629 100644 (file)
@@ -15,7 +15,7 @@
 
 #if wxUSE_HTML && wxUSE_STREAMS
 
 
 #if wxUSE_HTML && wxUSE_STREAMS
 
-#ifndef WXPRECOMP
+#ifndef WX_PRECOMP
     #include "wx/dynarray.h"
     #include "wx/dc.h"
     #include "wx/scrolwin.h"
     #include "wx/dynarray.h"
     #include "wx/dc.h"
     #include "wx/scrolwin.h"
@@ -68,7 +68,7 @@ class wxHtmlImageMapAreaCell : public wxHtmlCell
                   wxHtmlRenderingInfo& WXUNUSED(info)) {}
 
 
                   wxHtmlRenderingInfo& WXUNUSED(info)) {}
 
 
-    DECLARE_NO_COPY_CLASS(wxHtmlImageMapAreaCell)
+    wxDECLARE_NO_COPY_CLASS(wxHtmlImageMapAreaCell);
 };
 
 
 };
 
 
@@ -246,7 +246,7 @@ class wxHtmlImageMapCell : public wxHtmlCell
                   int WXUNUSED(view_y1), int WXUNUSED(view_y2),
                   wxHtmlRenderingInfo& WXUNUSED(info)) {}
 
                   int WXUNUSED(view_y1), int WXUNUSED(view_y2),
                   wxHtmlRenderingInfo& WXUNUSED(info)) {}
 
-    DECLARE_NO_COPY_CLASS(wxHtmlImageMapCell)
+    wxDECLARE_NO_COPY_CLASS(wxHtmlImageMapCell);
 };
 
 
 };
 
 
@@ -315,7 +315,7 @@ private:
     wxHtmlImageMapCell *m_imageMap;
     wxString            m_mapName;
 
     wxHtmlImageMapCell *m_imageMap;
     wxString            m_mapName;
 
-    DECLARE_NO_COPY_CLASS(wxHtmlImageCell)
+    wxDECLARE_NO_COPY_CLASS(wxHtmlImageCell);
 };
 
 #if wxUSE_GIF && wxUSE_TIMER
 };
 
 #if wxUSE_GIF && wxUSE_TIMER
@@ -331,7 +331,7 @@ class wxGIFTimer : public wxTimer
     private:
         wxHtmlImageCell *m_cell;
 
     private:
         wxHtmlImageCell *m_cell;
 
-    DECLARE_NO_COPY_CLASS(wxGIFTimer)
+    wxDECLARE_NO_COPY_CLASS(wxGIFTimer);
 };
 #endif
 
 };
 #endif
 
@@ -388,7 +388,10 @@ wxHtmlImageCell::wxHtmlImageCell(wxHtmlWindowInterface *windowIface,
                         if ( m_gifDecoder->IsAnimation() )
                         {
                             m_gifTimer = new wxGIFTimer(this);
                         if ( m_gifDecoder->IsAnimation() )
                         {
                             m_gifTimer = new wxGIFTimer(this);
-                            m_gifTimer->Start(m_gifDecoder->GetDelay(0), true);
+                            long delay = m_gifDecoder->GetDelay(0);
+                            if ( delay == 0 )
+                                delay = 1;
+                            m_gifTimer->Start(delay, true);
                         }
                         else
                         {
                         }
                         else
                         {
@@ -522,7 +525,10 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer)
         win->Refresh(img.HasMask(), &rect);
     }
 
         win->Refresh(img.HasMask(), &rect);
     }
 
-    timer->Start(m_gifDecoder->GetDelay(m_nCurrFrame), true);
+    long delay = m_gifDecoder->GetDelay(m_nCurrFrame);
+    if ( delay == 0 )
+        delay = 1;
+    timer->Start(delay, true);
 }
 
 void wxHtmlImageCell::Layout(int w)
 }
 
 void wxHtmlImageCell::Layout(int w)