summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Hurlbut <ghurlbut@mythtv.org>2010-11-20 06:16:21 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2010-11-20 06:16:21 (GMT)
commit5b5e3354d3c85dd1c174523cfbd39d012420d570 (patch)
treef39a48c72b00340cc5c5dc0f2412de9516e180cb
parent58edeb15397588181257513994b8dd53e5275c74 (diff)
Small changes to MythUIImage::Load, ::Reset and ::Clear to keep non-animated
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
-rw-r--r--mythtv/libs/libmythui/mythuiimage.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/mythtv/libs/libmythui/mythuiimage.cpp b/mythtv/libs/libmythui/mythuiimage.cpp
index 8983421..9aa65fb 100644
--- a/mythtv/libs/libmythui/mythuiimage.cpp
+++ b/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);