Skip to content

Commit dd1bb9f

Browse files
committedDec 10, 2014
iface.getFeatureDialog creates an "add" dialog for an invalid feature
1 parent 5fd04e6 commit dd1bb9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/app/qgisappinterface.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,10 @@ QgsAttributeDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeat
636636
context.setDistanceArea( myDa );
637637
context.setVectorLayerTools( qgis->vectorLayerTools() );
638638
QgsAttributeDialog *dialog = new QgsAttributeDialog( l, &feature, false, NULL, true, context );
639+
if ( !feature.isValid() )
640+
{
641+
dialog->setIsAddDialog( true );
642+
}
639643
return dialog;
640644
}
641645

0 commit comments

Comments
 (0)
Please sign in to comment.