Skip to content
Permalink
Browse files

Don't forget to add new point to undo stack.

git-svn-id: http://svn.osgeo.org/qgis/trunk@10923 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Jun 14, 2009
1 parent d080101 commit c51e076dea81d8926574fa6a0a5087e69e0df285
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgsmaptooladdfeature.cpp
@@ -175,13 +175,16 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
f->addAttribute( it.key(), provider->defaultValue( it.key() ) );
}

vlayer->beginEditCommand( tr("Feature added") );

// show the dialog to enter attribute values
QSettings settings;
bool isDisabledAttributeValuesDlg = settings.value( "/qgis/digitizing/disable_enter_attribute_values_dialog", false ).toBool();
if ( isDisabledAttributeValuesDlg )
{
QgsDebugMsg( "Adding feature to layer" );
vlayer->addFeature( *f );
vlayer->endEditCommand();
}
else
{
@@ -190,14 +193,17 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
{
QgsDebugMsg( "Adding feature to layer" );
vlayer->addFeature( *f );
vlayer->endEditCommand();
}
else
{
vlayer->destroyEditCommand();
QgsDebugMsg( "Adding feature to layer failed" );
delete f;
}
delete mypDialog;
}

mCanvas->refresh();
}

0 comments on commit c51e076

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