Skip to content
Permalink
Browse files

do not show empty config when loading attribute form properties (#35039)

  • Loading branch information
3nids committed Mar 12, 2020
1 parent 712230f commit 14355ba03a48657096476c7df31259fbcdf57b21
Showing with 0 additions and 18 deletions.
  1. +0 −18 src/gui/vector/qgsattributesformproperties.cpp
@@ -60,18 +60,6 @@ QgsAttributesFormProperties::QgsAttributesFormProperties( QgsVectorLayer *layer,
mFormLayoutTree->setHeaderLabels( QStringList() << tr( "Form Layout" ) );
mFormLayoutTree->setType( QgsAttributesDnDTree::Type::Drop );

// AttributeTypeDialog
mAttributeTypeDialog = new QgsAttributeTypeDialog( mLayer, -1, mAttributeTypeFrame );
mAttributeTypeDialog->layout()->setMargin( 0 );
mAttributeTypeFrame->layout()->setMargin( 0 );
mAttributeTypeFrame->layout()->addWidget( mAttributeTypeDialog );

// AttributeRelationEdit
mAttributeRelationEdit = new QgsAttributeRelationEdit( "", mAttributeTypeFrame );
mAttributeRelationEdit->layout()->setMargin( 0 );
mAttributeTypeFrame->layout()->setMargin( 0 );
mAttributeTypeFrame->layout()->addWidget( mAttributeRelationEdit );

connect( mAvailableWidgetsTree, &QTreeWidget::itemSelectionChanged, this, &QgsAttributesFormProperties::onAttributeSelectionChanged );
connect( mFormLayoutTree, &QTreeWidget::itemSelectionChanged, this, &QgsAttributesFormProperties::onFormLayoutSelectionChanged );
connect( mAddTabOrGroupButton, &QAbstractButton::clicked, this, &QgsAttributesFormProperties::addTabOrGroupButton );
@@ -251,12 +239,6 @@ void QgsAttributesFormProperties::loadAttributeTypeDialog()
return;

mAttributeTypeDialog = new QgsAttributeTypeDialog( mLayer, index, mAttributeTypeFrame );
mAttributeTypeDialog->setEnabled( true );

// AttributeTypeDialog delete and recreate
mAttributeTypeFrame->layout()->removeWidget( mAttributeTypeDialog );
delete mAttributeTypeDialog;
mAttributeTypeDialog = new QgsAttributeTypeDialog( mLayer, index, mAttributeTypeFrame );

QgsFieldConstraints constraints = cfg.mFieldConstraints;

0 comments on commit 14355ba

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