Skip to content

Commit

Permalink
Fix for trac ticket #236 (Cannot stop editing mode when nothing was e…
Browse files Browse the repository at this point in the history
…dited), which was carelessly introduced in the second dot point of r5694.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5702 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
morb_au committed Aug 16, 2006
1 parent c4939aa commit 7716974
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/gui/qgsvectorlayer.cpp
Expand Up @@ -1996,27 +1996,31 @@ void QgsVectorLayer::stopEditing()
emit editingStopped(false);
}

if (
(commitSuccessful) ||
(rollbackSuccessful)
)
{
// convert state to non-editing mode
deleteCachedGeometries();
}

mEditable=false;
triggerRepaint();
mModified=false;
if(isValid())
if (
(!dataProvider) ||
(!mModified) ||
(commitSuccessful) ||
(rollbackSuccessful)
)
{
// convert state to non-editing mode
deleteCachedGeometries();

mEditable=false;
triggerRepaint();
mModified=false;
if(isValid())
{
updateItemPixmap();
if(mToggleEditingAction)
{
updateItemPixmap();
if(mToggleEditingAction)
{
mToggleEditingAction->setChecked(false);
}
mToggleEditingAction->setChecked(false);
}
}
}

}

// return state of scale dependent rendering. True if features should
Expand Down

0 comments on commit 7716974

Please sign in to comment.