Skip to content

Commit

Permalink
Split Z/M checkbox into 2 checkboxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-marcel committed Aug 24, 2017
1 parent 64df114 commit bd8dece
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 23 deletions.
10 changes: 5 additions & 5 deletions src/gui/qgsnewgeopackagelayerdialog.cpp
Expand Up @@ -350,11 +350,11 @@ bool QgsNewGeoPackageLayerDialog::apply()
( mGeometryTypeBox->currentData( Qt::UserRole ).toInt() ); ( mGeometryTypeBox->currentData( Qt::UserRole ).toInt() );


// z-coordinate & m-value. // z-coordinate & m-value.
if (mGeometryWithZCheckBox->isChecked()) if ( mGeometryWithZCheckBox->isChecked() )
{ wkbType = OGR_GT_SetZ( wkbType );
wkbType = OGR_GT_SetZ(wkbType);
wkbType = OGR_GT_SetM(wkbType); if ( mGeometryWithMCheckBox->isChecked() )
} wkbType = OGR_GT_SetM( wkbType );


OGRSpatialReferenceH hSRS = nullptr; OGRSpatialReferenceH hSRS = nullptr;
// consider spatial reference system of the layer // consider spatial reference system of the layer
Expand Down
47 changes: 29 additions & 18 deletions src/ui/qgsnewgeopackagelayerdialogbase.ui
Expand Up @@ -62,11 +62,11 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>514</width> <width>514</width>
<height>644</height> <height>663</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="gridLayout_5">
<item row="5" column="0"> <item row="8" column="0">
<widget class="QCheckBox" name="mCheckBoxCreateSpatialIndex"> <widget class="QCheckBox" name="mCheckBoxCreateSpatialIndex">
<property name="toolTip"> <property name="toolTip">
<string>Add an integer id field as the primary key for the new layer</string> <string>Add an integer id field as the primary key for the new layer</string>
Expand All @@ -79,7 +79,7 @@
<item row="0" column="0"> <item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_6"/> <layout class="QHBoxLayout" name="horizontalLayout_6"/>
</item> </item>
<item row="6" column="0"> <item row="9" column="0">
<widget class="QGroupBox" name="groupBox_3"> <widget class="QGroupBox" name="groupBox_3">
<property name="title"> <property name="title">
<string>New field</string> <string>New field</string>
Expand Down Expand Up @@ -342,7 +342,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="0"> <item row="10" column="0">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>Fields list</string> <string>Fields list</string>
Expand Down Expand Up @@ -421,19 +421,30 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="6" column="0">
<widget class="QgsProjectionSelectionWidget" name="mCrsSelector" native="true"> <widget class="QgsProjectionSelectionWidget" name="mCrsSelector">
<property name="focusPolicy"> <property name="focusPolicy">
<enum>Qt::StrongFocus</enum> <enum>Qt::StrongFocus</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="mGeometryWithZCheckBox"> <layout class="QHBoxLayout" name="horizontalZMLayout">
<property name="text"> <item>
<string>Geometries with Z/M coordinate</string> <widget class="QCheckBox" name="mGeometryWithZCheckBox">
</property> <property name="text">
</widget> <string>Geometries with Z coordinate</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mGeometryWithMCheckBox">
<property name="text">
<string>Geometries with M coordinate</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
Expand All @@ -443,18 +454,18 @@
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets> <customwidgets>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgsscrollarea.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>QgsProjectionSelectionWidget</class> <class>QgsProjectionSelectionWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>qgsprojectionselectionwidget.h</header> <header>qgsprojectionselectionwidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgsscrollarea.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>scrollArea</tabstop> <tabstop>scrollArea</tabstop>
Expand Down

0 comments on commit bd8dece

Please sign in to comment.