Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ui] split Z/M values checkbox in new memory layer dialog (#5685)
  • Loading branch information
nirvn committed Nov 21, 2017
1 parent 0b3f86d commit 4bc4494
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/gui/qgsnewmemorylayerdialog.cpp
Expand Up @@ -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;
}
Expand Down
21 changes: 16 additions & 5 deletions src/ui/qgsnewmemorylayerdialogbase.ui
Expand Up @@ -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">
Expand Down

0 comments on commit 4bc4494

Please sign in to comment.