Skip to content

Commit 9231f54

Browse files
Gillian Milanim-kuhn
authored andcommittedNov 24, 2014
clean code style with prepare-commit.sh
1 parent 6f4809d commit 9231f54

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed
 

‎src/app/qgsguivectorlayertools.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,28 +65,27 @@ bool QgsGuiVectorLayerTools::startEditing( QgsVectorLayer* layer ) const
6565
return res;
6666
}
6767

68-
bool QgsGuiVectorLayerTools::saveEdits( QgsVectorLayer* layer) const
68+
bool QgsGuiVectorLayerTools::saveEdits( QgsVectorLayer* layer ) const
6969
{
7070
bool res = true;
7171

7272
if ( layer->isModified() )
7373
{
74-
if ( !layer->commitChanges() )
75-
{
76-
commitError( layer );
77-
// Leave the in-memory editing state alone,
78-
// to give the user a chance to enter different values
79-
// and try the commit again later
80-
res = false;
81-
}
82-
layer->triggerRepaint();
83-
layer->startEditing();
74+
if ( !layer->commitChanges() )
75+
{
76+
commitError( layer );
77+
// Leave the in-memory editing state alone,
78+
// to give the user a chance to enter different values
79+
// and try the commit again later
80+
res = false;
81+
}
82+
layer->startEditing();
8483
}
8584
else //layer not modified
86-
{
87-
res = true;
88-
layer->triggerRepaint();
89-
}
85+
{
86+
res = true;
87+
layer->triggerRepaint();
88+
}
9089
return res;
9190
}
9291

0 commit comments

Comments
 (0)
Please sign in to comment.