Skip to content
Permalink
Browse files

add call to embedded widget provider `supportsLayer()`

This method was not previously being called anywhere. It is now called in the embedded widget config
just before showing the available providers
  • Loading branch information
ricardogsilva authored and nyalldawson committed Oct 2, 2018
1 parent 5c7fd20 commit 16a57a378d924bf64cbc902974399d480aab9d14
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/gui/layertree/qgslayertreeembeddedconfigwidget.cpp
@@ -42,10 +42,13 @@ void QgsLayerTreeEmbeddedConfigWidget::setLayer( QgsMapLayer *layer )
Q_FOREACH ( const QString &providerId, QgsGui::layerTreeEmbeddedWidgetRegistry()->providers() )
{
QgsLayerTreeEmbeddedWidgetProvider *provider = QgsGui::layerTreeEmbeddedWidgetRegistry()->provider( providerId );
QStandardItem *item = new QStandardItem( provider->name() );
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
item->setData( provider->id(), Qt::UserRole + 1 );
modelAvailable->appendRow( item );
if ( provider->supportsLayer( mLayer ) )
{
QStandardItem *item = new QStandardItem( provider->name() );
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
item->setData( provider->id(), Qt::UserRole + 1 );
modelAvailable->appendRow( item );
}
}
mListAvailable->setModel( modelAvailable );

0 comments on commit 16a57a3

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