Skip to content
Permalink
Browse files

Merge pull request #5061 from nouanda/fix16887

Fix #16887: creating a memory scratch layer with Z/M values does not add Z/M to the layer
  • Loading branch information
nyalldawson committed Aug 25, 2017
2 parents 65455c4 + 018c13a commit 233f25abd929f3621f7dde3a4c03dddb0977e71a
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/app/nodetool/qgsnodeeditor.cpp
@@ -47,20 +47,19 @@ QgsNodeEditorModel::QgsNodeEditorModel( QgsVectorLayer *layer, QgsSelectedFeatur
, mRCol( -1 )
{

if ( !mSelectedFeature->vertexMap().isEmpty() )
{
mHasZ = mSelectedFeature->vertexMap().at( 0 )->point().is3D();
mHasM = mSelectedFeature->vertexMap().at( 0 )->point().isMeasure();
QgsWkbTypes::Type layerWKBType = mLayer->wkbType();

if ( mHasZ )
mZCol = 2;
mHasZ = QgsWkbTypes::hasZ( layerWKBType );
mHasM = QgsWkbTypes::hasM( layerWKBType );

if ( mHasM )
mMCol = 2 + ( mHasZ ? 1 : 0 );
if ( mHasZ )
mZCol = 2;

if ( mHasR )
mRCol = 2 + ( mHasZ ? 1 : 0 ) + ( mHasM ? 1 : 0 );
}
if ( mHasM )
mMCol = 2 + ( mHasZ ? 1 : 0 );

if ( mHasR )
mRCol = 2 + ( mHasZ ? 1 : 0 ) + ( mHasM ? 1 : 0 );

QWidget *parentWidget = dynamic_cast< QWidget * >( parent );
if ( parentWidget )

0 comments on commit 233f25a

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