Skip to content
Permalink
Browse files

Use layer type instead of first vertex type

  • Loading branch information
nouanda committed Aug 23, 2017
1 parent c5371b6 commit 018c13afbf4a53c4bb465f1e157b584e8a78fae2
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 018c13a

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