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:
parent
c2284cb48e
commit
c77b2bf9a8
@ -222,6 +222,7 @@ void FrameSvg::setElementPrefix(const QString &prefix)
|
|||||||
d->prefix += '-';
|
d->prefix += '-';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
d->requestedPrefix = prefix;
|
||||||
|
|
||||||
FrameData *oldFrameData = d->frames.value(oldPrefix);
|
FrameData *oldFrameData = d->frames.value(oldPrefix);
|
||||||
if (oldPrefix == d->prefix && oldFrameData) {
|
if (oldPrefix == d->prefix && oldFrameData) {
|
||||||
@ -1119,6 +1120,7 @@ void FrameSvgPrivate::updateSizes() const
|
|||||||
|
|
||||||
void FrameSvgPrivate::updateNeeded()
|
void FrameSvgPrivate::updateNeeded()
|
||||||
{
|
{
|
||||||
|
q->setElementPrefix(requestedPrefix);
|
||||||
q->clearCache();
|
q->clearCache();
|
||||||
updateSizes();
|
updateSizes();
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,9 @@ public:
|
|||||||
|
|
||||||
Types::Location location;
|
Types::Location location;
|
||||||
QString prefix;
|
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;
|
FrameSvg *q;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user