[QGIS Commit] r10923 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Jun 14 13:11:48 EDT 2009
Author: wonder
Date: 2009-06-14 13:11:48 -0400 (Sun, 14 Jun 2009)
New Revision: 10923
Modified:
trunk/qgis/src/app/qgsmaptooladdfeature.cpp
Log:
Don't forget to add new point to undo stack.
Modified: trunk/qgis/src/app/qgsmaptooladdfeature.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooladdfeature.cpp 2009-06-14 17:10:34 UTC (rev 10922)
+++ trunk/qgis/src/app/qgsmaptooladdfeature.cpp 2009-06-14 17:11:48 UTC (rev 10923)
@@ -175,6 +175,8 @@
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();
@@ -182,6 +184,7 @@
{
QgsDebugMsg( "Adding feature to layer" );
vlayer->addFeature( *f );
+ vlayer->endEditCommand();
}
else
{
@@ -190,14 +193,17 @@
{
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();
}
More information about the QGIS-commit
mailing list