Skip to content

Commit 308b46e

Browse files
committedDec 21, 2018
Make geometry constraint configuration size fit the contents
1 parent 3dd3609 commit 308b46e

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed
 

‎src/app/qgsvectorlayerproperties.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
429429
geometryCheckLayout->addWidget( cb );
430430
}
431431
mGeometryValidationGroupBox->setLayout( geometryCheckLayout );
432+
mGeometryValidationGroupBox->setVisible( !geometryCheckFactories.isEmpty() );
432433

433434
QLayout *topologyCheckLayout = new QVBoxLayout();
434435
const QList<QgsGeometryCheckFactory *> topologyCheckFactories = QgsAnalysis::instance()->geometryCheckRegistry()->geometryCheckFactories( mLayer, QgsGeometryCheck::LayerCheck, QgsGeometryCheck::Flag::AvailableInValidation );
@@ -441,6 +442,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
441442
topologyCheckLayout->addWidget( cb );
442443
}
443444
mTopologyChecksGroupBox->setLayout( topologyCheckLayout );
445+
mTopologyChecksGroupBox->setVisible( !topologyCheckFactories.isEmpty() );
444446
}
445447
else
446448
{

‎src/ui/qgsvectorlayerpropertiesbase.ui

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@
433433
<rect>
434434
<x>0</x>
435435
<y>0</y>
436-
<width>325</width>
437-
<height>389</height>
436+
<width>315</width>
437+
<height>403</height>
438438
</rect>
439439
</property>
440440
<layout class="QVBoxLayout" name="verticalLayout_9">
@@ -907,8 +907,8 @@ border-radius: 2px;</string>
907907
<rect>
908908
<x>0</x>
909909
<y>0</y>
910-
<width>104</width>
911-
<height>102</height>
910+
<width>185</width>
911+
<height>112</height>
912912
</rect>
913913
</property>
914914
<layout class="QVBoxLayout" name="verticalLayout_23">
@@ -1504,8 +1504,8 @@ border-radius: 2px;</string>
15041504
<rect>
15051505
<x>0</x>
15061506
<y>0</y>
1507-
<width>685</width>
1508-
<height>346</height>
1507+
<width>734</width>
1508+
<height>372</height>
15091509
</rect>
15101510
</property>
15111511
<layout class="QVBoxLayout" name="verticalLayout_32">
@@ -1961,8 +1961,8 @@ border-radius: 2px;</string>
19611961
<rect>
19621962
<x>0</x>
19631963
<y>0</y>
1964-
<width>340</width>
1965-
<height>630</height>
1964+
<width>378</width>
1965+
<height>678</height>
19661966
</rect>
19671967
</property>
19681968
<layout class="QVBoxLayout" name="verticalLayout_13">
@@ -2367,8 +2367,8 @@ border-radius: 2px;</string>
23672367
<rect>
23682368
<x>0</x>
23692369
<y>0</y>
2370-
<width>651</width>
2371-
<height>804</height>
2370+
<width>658</width>
2371+
<height>800</height>
23722372
</rect>
23732373
</property>
23742374
<layout class="QVBoxLayout" name="verticalLayout_20">
@@ -2377,8 +2377,15 @@ border-radius: 2px;</string>
23772377
<property name="title">
23782378
<string>Automatic Fixes</string>
23792379
</property>
2380-
<layout class="QFormLayout" name="formLayout">
2381-
<item row="2" column="0">
2380+
<layout class="QGridLayout" name="gridLayout">
2381+
<item row="0" column="0" colspan="2">
2382+
<widget class="QCheckBox" name="mRemoveDuplicateNodesCheckbox">
2383+
<property name="text">
2384+
<string>Remove duplicate nodes</string>
2385+
</property>
2386+
</widget>
2387+
</item>
2388+
<item row="1" column="0">
23822389
<widget class="QLabel" name="label">
23832390
<property name="toolTip">
23842391
<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>
@@ -2388,14 +2395,7 @@ border-radius: 2px;</string>
23882395
</property>
23892396
</widget>
23902397
</item>
2391-
<item row="0" column="0" colspan="2">
2392-
<widget class="QCheckBox" name="mRemoveDuplicateNodesCheckbox">
2393-
<property name="text">
2394-
<string>Remove duplicate nodes</string>
2395-
</property>
2396-
</widget>
2397-
</item>
2398-
<item row="2" column="1">
2398+
<item row="1" column="1">
23992399
<layout class="QHBoxLayout" name="horizontalLayout_11" stretch="0,0">
24002400
<item>
24012401
<widget class="QLabel" name="mPrecisionUnitsLabel">
@@ -2436,6 +2436,19 @@ border-radius: 2px;</string>
24362436
</property>
24372437
</widget>
24382438
</item>
2439+
<item>
2440+
<spacer name="verticalSpacer_4">
2441+
<property name="orientation">
2442+
<enum>Qt::Vertical</enum>
2443+
</property>
2444+
<property name="sizeHint" stdset="0">
2445+
<size>
2446+
<width>20</width>
2447+
<height>40</height>
2448+
</size>
2449+
</property>
2450+
</spacer>
2451+
</item>
24392452
</layout>
24402453
</widget>
24412454
</widget>
@@ -2653,6 +2666,8 @@ border-radius: 2px;</string>
26532666
<include location="../../images/images.qrc"/>
26542667
<include location="../../images/images.qrc"/>
26552668
<include location="../../images/images.qrc"/>
2669+
<include location="../../images/images.qrc"/>
2670+
<include location="../../images/images.qrc"/>
26562671
</resources>
26572672
<connections>
26582673
<connection>

0 commit comments

Comments
 (0)
Please sign in to comment.