Skip to content
Permalink
Browse files

Also update symbol previews when a remote SVG is fetched

  • Loading branch information
nyalldawson committed Apr 9, 2018
1 parent 45c400c commit 969b129b6ec863e4e48fb832b755fdeeb22c743d
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 969b129

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