Skip to content
Permalink
Browse files

[ui] split Z/M values checkbox in new memory layer dialog (#5685)

  • Loading branch information
nirvn committed Nov 21, 2017
1 parent 0b3f86d commit 4bc4494e12a014f16ca1d782eff01ffa8f3c0e02
Showing with 23 additions and 7 deletions.
  1. +7 −2 src/gui/qgsnewmemorylayerdialog.cpp
  2. +16 −5 src/ui/qgsnewmemorylayerdialogbase.ui
@@ -98,8 +98,13 @@ QgsWkbTypes::Type QgsNewMemoryLayerDialog::selectedType() const
wkbType = QgsWkbTypes::MultiPolygon;
}

if ( mGeometryWithZCheckBox->isChecked() && wkbType != QgsWkbTypes::Unknown && wkbType != QgsWkbTypes::NoGeometry )
wkbType = QgsWkbTypes::zmType( wkbType, true, true );
if ( wkbType != QgsWkbTypes::Unknown && wkbType != QgsWkbTypes::NoGeometry )
{
if ( mGeometryWithZCheckBox->isChecked() )
wkbType = QgsWkbTypes::addZ( wkbType );
if ( mGeometryWithMCheckBox->isChecked() )
wkbType = QgsWkbTypes::addM( wkbType );
}

return wkbType;
}
@@ -79,11 +79,22 @@
</layout>
</item>
<item>
<widget class="QCheckBox" name="mGeometryWithZCheckBox">
<property name="text">
<string>Geometries with Z/M coordinate</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="mGeometryWithZCheckBox">
<property name="text">
<string>Include Z dimension</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mGeometryWithMCheckBox">
<property name="text">
<string>Include M values</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QgsProjectionSelectionWidget" name="mCrsSelector" native="true">

0 comments on commit 4bc4494

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