File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed
Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments