Permalink
Browse files

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...
1 parent 58edeb1 commit 5b5e3354d3c85dd1c174523cfbd39d012420d570 @Beirdo Beirdo committed Nov 20, 2010
Showing with 14 additions and 2 deletions.
  1. +14 −2 mythtv/libs/libmythui/mythuiimage.cpp
@@ -210,6 +210,12 @@ void MythUIImage::Clear(void)
m_Images.remove(it.key());
}
m_Delays.clear();
+ if (m_animatedImage)
+ {
+ m_LowNum = 0;
+ m_HighNum = 0;
+ m_animatedImage = false;
+ }
}
/**
@@ -221,7 +227,12 @@ void MythUIImage::Reset(void)
if (m_Filename != m_OrigFilename)
{
m_Filename = m_OrigFilename;
- m_animatedImage = false;
+ if (m_animatedImage)
+ {
+ m_LowNum = 0;
+ m_HighNum = 0;
+ m_animatedImage = false;
+ }
d->m_UpdateLock.unlock();
Load();
}
@@ -570,7 +581,8 @@ bool MythUIImage::Load(bool allowLoadInBackground, bool forceStat)
int j = 0;
for (int i = m_LowNum; i <= m_HighNum && !m_animatedImage; i++)
{
- if (!m_animatedImage && m_HighNum >= 1)
+ if (!m_animatedImage && m_HighNum != m_LowNum &&
+ bFilename.contains("%1"))
filename = bFilename.arg(i);
imagelabel = GenImageLabel(filename, w, h);

0 comments on commit 5b5e335

Please sign in to comment.