Skip to content

Commit

Permalink
Allow custom QgsDataItem types a chance to create a info widget
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed May 15, 2020
1 parent 77bb13a commit 737159e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsbrowserdockwidget_p.cpp
Expand Up @@ -84,6 +84,7 @@ QgsBrowserPropertiesWidget::QgsBrowserPropertiesWidget( QWidget *parent )
void QgsBrowserPropertiesWidget::setWidget( QWidget *paramWidget )
{
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setContentsMargins( 0, 0, 0, 0 );
paramWidget->setParent( this );
layout->addWidget( paramWidget );
}
Expand All @@ -98,7 +99,7 @@ QgsBrowserPropertiesWidget *QgsBrowserPropertiesWidget::createWidget( QgsDataIte
propertiesWidget = new QgsBrowserDirectoryProperties( parent );
propertiesWidget->setItem( item );
}
else if ( item->type() == QgsDataItem::Layer )
else if ( item->type() == QgsDataItem::Layer || item->type() == QgsDataItem::Custom )
{
// try new infrastructure of creation of layer widgets
QWidget *paramWidget = nullptr;
Expand All @@ -123,7 +124,7 @@ QgsBrowserPropertiesWidget *QgsBrowserPropertiesWidget::createWidget( QgsDataIte
propertiesWidget = new QgsBrowserPropertiesWidget( parent );
propertiesWidget->setWidget( paramWidget );
}
else
else if ( item->type() == QgsDataItem::Layer )
{
propertiesWidget = new QgsBrowserLayerProperties( parent );
propertiesWidget->setItem( item );
Expand Down

0 comments on commit 737159e

Please sign in to comment.