mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
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
This commit is contained in:
commit
233f25abd9
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user