fix switch from a less complete to a more complete

if the old theme didn't have a prefix, but the new one has,
set the old (formerly nonexisting) prefix again
This commit is contained in:
Marco Martin 2014-07-11 16:42:55 +02:00
parent c2284cb48e
commit c77b2bf9a8
2 changed files with 5 additions and 0 deletions

View File

@ -222,6 +222,7 @@ void FrameSvg::setElementPrefix(const QString &prefix)
d->prefix += '-';
}
}
d->requestedPrefix = prefix;
FrameData *oldFrameData = d->frames.value(oldPrefix);
if (oldPrefix == d->prefix && oldFrameData) {
@ -1119,6 +1120,7 @@ void FrameSvgPrivate::updateSizes() const
void FrameSvgPrivate::updateNeeded()
{
q->setElementPrefix(requestedPrefix);
q->clearCache();
updateSizes();
}

View File

@ -149,6 +149,9 @@ public:
Types::Location location;
QString prefix;
//sometimes the prefix we requested is not available, so prefix will be emoty
//keep track of the requested one anyways, we'll try again when the theme changes
QString requestedPrefix;
FrameSvg *q;