Skip to content
Permalink
Browse files

clean code style with prepare-commit.sh

  • Loading branch information
Gillian Milani authored and m-kuhn committed Nov 24, 2014
1 parent 6f4809d commit 9231f548b5cd98b005149dc67b71a7818cb2c88a
Showing with 14 additions and 15 deletions.
  1. +14 −15 src/app/qgsguivectorlayertools.cpp
@@ -65,28 +65,27 @@ bool QgsGuiVectorLayerTools::startEditing( QgsVectorLayer* layer ) const
return res;
}

bool QgsGuiVectorLayerTools::saveEdits( QgsVectorLayer* layer) const
bool QgsGuiVectorLayerTools::saveEdits( QgsVectorLayer* layer ) const
{
bool res = true;

if ( layer->isModified() )
{
if ( !layer->commitChanges() )
{
commitError( layer );
// Leave the in-memory editing state alone,
// to give the user a chance to enter different values
// and try the commit again later
res = false;
}
layer->triggerRepaint();
layer->startEditing();
if ( !layer->commitChanges() )
{
commitError( layer );
// Leave the in-memory editing state alone,
// to give the user a chance to enter different values
// and try the commit again later
res = false;
}
layer->startEditing();
}
else //layer not modified
{
res = true;
layer->triggerRepaint();
}
{
res = true;
layer->triggerRepaint();
}
return res;
}

0 comments on commit 9231f54

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