Skip to content

Commit

Permalink
Make geometry constraint configuration size fit the contents
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Dec 21, 2018
1 parent 3dd3609 commit 308b46e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 20 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -429,6 +429,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
geometryCheckLayout->addWidget( cb );
}
mGeometryValidationGroupBox->setLayout( geometryCheckLayout );
mGeometryValidationGroupBox->setVisible( !geometryCheckFactories.isEmpty() );

QLayout *topologyCheckLayout = new QVBoxLayout();
const QList<QgsGeometryCheckFactory *> topologyCheckFactories = QgsAnalysis::instance()->geometryCheckRegistry()->geometryCheckFactories( mLayer, QgsGeometryCheck::LayerCheck, QgsGeometryCheck::Flag::AvailableInValidation );
Expand All @@ -441,6 +442,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
topologyCheckLayout->addWidget( cb );
}
mTopologyChecksGroupBox->setLayout( topologyCheckLayout );
mTopologyChecksGroupBox->setVisible( !topologyCheckFactories.isEmpty() );
}
else
{
Expand Down
55 changes: 35 additions & 20 deletions src/ui/qgsvectorlayerpropertiesbase.ui
Expand Up @@ -433,8 +433,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>325</width>
<height>389</height>
<width>315</width>
<height>403</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
Expand Down Expand Up @@ -907,8 +907,8 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>104</width>
<height>102</height>
<width>185</width>
<height>112</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
Expand Down Expand Up @@ -1504,8 +1504,8 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>685</width>
<height>346</height>
<width>734</width>
<height>372</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
Expand Down Expand Up @@ -1961,8 +1961,8 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>340</width>
<height>630</height>
<width>378</width>
<height>678</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_13">
Expand Down Expand Up @@ -2367,8 +2367,8 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>651</width>
<height>804</height>
<width>658</width>
<height>800</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_20">
Expand All @@ -2377,8 +2377,15 @@ border-radius: 2px;</string>
<property name="title">
<string>Automatic Fixes</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="2" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="mRemoveDuplicateNodesCheckbox">
<property name="text">
<string>Remove duplicate nodes</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The geometry precision defines the maximum precision to of geometry coordinates that should be stored on this layer. A snap to grid algorithm will be applied on every geometry entering this layer, resulting in coordinates being rounded to multiples of this value. The operation is applied in this layer's coordinate reference system.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
Expand All @@ -2388,14 +2395,7 @@ border-radius: 2px;</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="mRemoveDuplicateNodesCheckbox">
<property name="text">
<string>Remove duplicate nodes</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_11" stretch="0,0">
<item>
<widget class="QLabel" name="mPrecisionUnitsLabel">
Expand Down Expand Up @@ -2436,6 +2436,19 @@ border-radius: 2px;</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
Expand Down Expand Up @@ -2653,6 +2666,8 @@ border-radius: 2px;</string>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
<include location="../../images/images.qrc"/>
</resources>
<connections>
<connection>
Expand Down

0 comments on commit 308b46e

Please sign in to comment.