From c77b2bf9a81ec330df0759821e9bc5a6aef29ed4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 11 Jul 2014 16:42:55 +0200 Subject: [PATCH] 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 --- src/plasma/framesvg.cpp | 2 ++ src/plasma/private/framesvg_p.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/plasma/framesvg.cpp b/src/plasma/framesvg.cpp index d733790fb..c01051b5a 100644 --- a/src/plasma/framesvg.cpp +++ b/src/plasma/framesvg.cpp @@ -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(); } diff --git a/src/plasma/private/framesvg_p.h b/src/plasma/private/framesvg_p.h index 21ec2234e..b8d24456e 100644 --- a/src/plasma/private/framesvg_p.h +++ b/src/plasma/private/framesvg_p.h @@ -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;