Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Small changes to MythUIImage::Load, ::Reset and ::Clear to keep non-a…

…nimated

GIF from not being reloaded (and then from aborting the frontend).  This is an
edge case, but an important one as weather maps are coming in as GIF at this 
time (animated and non-animated).

This seems to work and not mess up other images.  Animated GIF do act oddly
after a reload, but they recover, so if we need to tweak something else to
fix them, so be it.



git-svn-id: http://svn.mythtv.org/svn/trunk@27302 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
commit 5b5e3354d3c85dd1c174523cfbd39d012420d570 1 parent 58edeb1
Gavin Hurlbut Beirdo authored

Showing 1 changed file with 14 additions and 2 deletions. Show diff stats Hide diff stats

  1. +14 2 mythtv/libs/libmythui/mythuiimage.cpp
16 mythtv/libs/libmythui/mythuiimage.cpp
@@ -210,6 +210,12 @@ void MythUIImage::Clear(void)
210 210 m_Images.remove(it.key());
211 211 }
212 212 m_Delays.clear();
  213 + if (m_animatedImage)
  214 + {
  215 + m_LowNum = 0;
  216 + m_HighNum = 0;
  217 + m_animatedImage = false;
  218 + }
213 219 }
214 220
215 221 /**
@@ -221,7 +227,12 @@ void MythUIImage::Reset(void)
221 227 if (m_Filename != m_OrigFilename)
222 228 {
223 229 m_Filename = m_OrigFilename;
224   - m_animatedImage = false;
  230 + if (m_animatedImage)
  231 + {
  232 + m_LowNum = 0;
  233 + m_HighNum = 0;
  234 + m_animatedImage = false;
  235 + }
225 236 d->m_UpdateLock.unlock();
226 237 Load();
227 238 }
@@ -570,7 +581,8 @@ bool MythUIImage::Load(bool allowLoadInBackground, bool forceStat)
570 581 int j = 0;
571 582 for (int i = m_LowNum; i <= m_HighNum && !m_animatedImage; i++)
572 583 {
573   - if (!m_animatedImage && m_HighNum >= 1)
  584 + if (!m_animatedImage && m_HighNum != m_LowNum &&
  585 + bFilename.contains("%1"))
574 586 filename = bFilename.arg(i);
575 587
576 588 imagelabel = GenImageLabel(filename, w, h);

0 comments on commit 5b5e335

Please sign in to comment.
Something went wrong with that request. Please try again.