Skip to content
Permalink
Browse files

Also update symbol previews when a remote SVG is fetched

(cherry-picked from 969b129)
  • Loading branch information
nyalldawson committed Apr 9, 2018
1 parent da0de64 commit 9b7ef031349b98dd977e05b72f5420e00da25042
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/gui/symbology/qgssymbolselectordialog.cpp
@@ -33,6 +33,7 @@
#include "qgssettings.h"
#include "qgsfeatureiterator.h"
#include "qgsvectorlayer.h"
#include "qgssvgcache.h"

#include <QColorDialog>
#include <QPainter>
@@ -283,6 +284,17 @@ QgsSymbolSelectorWidget::QgsSymbolSelectorWidget( QgsSymbol *symbol, QgsStyle *s
layersTree->setCurrentIndex( newIndex );

setPanelTitle( tr( "Symbol Selector" ) );

connect( QgsApplication::svgCache(), &QgsSvgCache::remoteSvgFetched, this, [ = ]
{
// when a remote svg has been fetched, update the widget's previews
// this is required if the symbol utilises remote svgs, and the current previews
// have been generated using the temporary "downloading" svg. In this case
// we require the preview to be regenerated to use the correct fetched
// svg
symbolChanged();
updatePreview();
} );
}

QMenu *QgsSymbolSelectorWidget::advancedMenu()

0 comments on commit 9b7ef03

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