Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 66f19ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/qgsvectorlayerdigitizingproperties.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 66f19ab

Please sign in to comment.