Skip to content
Permalink
Browse files

[ui] use grid layout for groupbox widgets in digitizing option

  • Loading branch information
slarosa authored and nyalldawson committed Oct 11, 2020
1 parent a76670e commit 66f19ab81073dc7010745e1bd33bb996ddb4efe0
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/app/qgsvectorlayerdigitizingproperties.cpp
@@ -98,19 +98,21 @@ QgsVectorLayerDigitizingPropertiesPage::QgsVectorLayerDigitizingPropertiesPage(
mGapCheckAllowExceptionsActivatedCheckBox = new QgsCollapsibleGroupBox( tr( "Allowed Gaps" ) );
mGapCheckAllowExceptionsActivatedCheckBox->setCheckable( true );
mGapCheckAllowExceptionsActivatedCheckBox->setChecked( gapCheckConfig.value( QStringLiteral( "allowedGapsEnabled" ), false ).toBool() );
QFormLayout *layout = new QFormLayout();
QGridLayout *layout = new QGridLayout();
mGapCheckAllowExceptionsActivatedCheckBox->setLayout( layout );
topologyCheckLayout->addWidget( mGapCheckAllowExceptionsActivatedCheckBox );
mGapCheckAllowExceptionsLayerComboBox = new QgsMapLayerComboBox();
mGapCheckAllowExceptionsLayerComboBox->setFilters( QgsMapLayerProxyModel::PolygonLayer );
mGapCheckAllowExceptionsLayerComboBox->setExceptedLayerList( QList<QgsMapLayer *> { vlayer } );
mGapCheckAllowExceptionsLayerComboBox->setLayer( QgsProject::instance()->mapLayer( gapCheckConfig.value( QStringLiteral( "allowedGapsLayer" ) ).toString() ) );
layout->addRow( new QLabel( tr( "Layer" ) ), mGapCheckAllowExceptionsLayerComboBox );
layout->addWidget( new QLabel( tr( "Layer" ) ), 0, 0 );
layout->addWidget( mGapCheckAllowExceptionsLayerComboBox, 0, 1 );
mGapCheckAllowExceptionsBufferSpinBox = new QgsDoubleSpinBox();
mGapCheckAllowExceptionsBufferSpinBox->setInputMethodHints( Qt::ImhFormattedNumbersOnly );
mGapCheckAllowExceptionsBufferSpinBox->setSuffix( QgsUnitTypes::toAbbreviatedString( vlayer->crs().mapUnits() ) );
mGapCheckAllowExceptionsBufferSpinBox->setValue( gapCheckConfig.value( QStringLiteral( "allowedGapsBuffer" ) ).toDouble() );
layout->addRow( new QLabel( tr( "Buffer" ) ), mGapCheckAllowExceptionsBufferSpinBox );
layout->addWidget( new QLabel( tr( "Buffer" ) ), 0, 2 );
layout->addWidget( mGapCheckAllowExceptionsBufferSpinBox, 0, 3 );
}
}
mTopologyChecksGroupBox->setLayout( topologyCheckLayout );

0 comments on commit 66f19ab

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