diff -r f7ac710697a9 -r 06ff229162e9 src/hbcore/image/hbframedrawer.cpp --- a/src/hbcore/image/hbframedrawer.cpp Mon May 03 12:48:33 2010 +0300 +++ b/src/hbcore/image/hbframedrawer.cpp Fri May 14 16:09:54 2010 +0300 @@ -922,9 +922,9 @@ /*! \internal */ -void HbFrameDrawerPrivate::reset( bool resetFrameCount ) +void HbFrameDrawerPrivate::reset(bool resetFrameCount, bool unloadedByServer) { - unLoadIcon(); + unLoadIcon(unloadedByServer); if ( resetFrameCount ) { frameParts = 0; } @@ -1020,13 +1020,13 @@ return id; } -void HbFrameDrawerPrivate::unLoadIcon() +void HbFrameDrawerPrivate::unLoadIcon(bool unloadedByServer) { HbIconLoader *loader = HbIconLoader::global(); if (icon) { //If a consolidated (stitched) icon was created on the themeserver, then //HbIconLoader::unloadIcon() is used to unload it. - loader->unLoadIcon(icon->iconImpl()); + loader->unLoadIcon(icon->iconImpl(),unloadedByServer); icon->dispose(); icon = 0; } @@ -1054,6 +1054,26 @@ fallbackMaskableIconList.clear(); // vector of HbMaskableIconImpl* } +void HbFrameDrawerPrivate::themeChange( const QStringList &updatedFiles) +{ + bool unloadIcons = false; + if (updatedFiles.count() == 0 || (icon && updatedFiles.contains(icon->iconFileName()))) { + unloadIcons = true; + } else { + HbMaskableIconImpl *fallbackIcon; + foreach (fallbackIcon, fallbackMaskableIconList) { + if (fallbackIcon && updatedFiles.contains(fallbackIcon->iconFileName())) { + unloadIcons = true; + break; + } + } + } + + if (unloadIcons) { + unLoadIcon(true); + } +} + /*! Constructs a new frame drawer item with the cacheFlag enabled by default. */ HbFrameDrawer::HbFrameDrawer(bool cacheFlag) @@ -1287,7 +1307,10 @@ // Rasterize the frame parts now if that has not been done yet. if (d->icon && (rect.toRect().size() != d->prevRect.size())) { d->reset(); - } + } + + // update the rendering mode + HbIconLoader::global()->updateRenderingMode(painter->paintEngine()->type()); d->prepareFrameIcon(); d->prevRect = rect.toRect(); // Paint the frame @@ -1530,7 +1553,10 @@ */ void HbFrameDrawer::themeChanged() { - d->reset(); +#ifndef HB_TOOL_INTERFACE + // This needs to be disabled to prevent full theme updates when using partial updates with tools. + d->reset(true, true); +#endif } /*!