Skip to content
Permalink
Browse files

Allow custom QgsDataItem types a chance to create a info widget

  • Loading branch information
github-actions authored and nyalldawson committed Apr 28, 2020
1 parent 77bb13a commit 737159e058aa3513cd6401b6848eaae67cd996f8
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/qgsbrowserdockwidget_p.cpp
@@ -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 );
}
@@ -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;
@@ -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 );

0 comments on commit 737159e

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