Skip to content
Permalink
Browse files

Fix for SVG cache

  • Loading branch information
mhugent committed Jun 27, 2013
1 parent 59222a0 commit 104b4d90c0f3a8fb94515afeee8c88fcab1c4a4d
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/core/symbology-ng/qgssvgcache.cpp
@@ -136,7 +136,10 @@ const QImage& QgsSvgCache::svgAsImage( const QString& file, double size, const Q
//currentEntry->image = new QImage( 0, 0 );

// instead cache picture
cachePicture( currentEntry );
if ( !currentEntry->picture )
{
cachePicture( currentEntry );
}
}
else
{
@@ -693,6 +696,11 @@ void QgsSvgCache::printEntryList()

void QgsSvgCache::trimToMaximumSize()
{
//only one entry in cache
if ( mLeastRecentEntry == mMostRecentEntry )
{
return;
}
QgsSvgCacheEntry* entry = mLeastRecentEntry;
while ( entry && ( mTotalSize > mMaximumSize ) )
{

0 comments on commit 104b4d9

Please sign in to comment.
You can’t perform that action at this time.