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

git-svn-id: http://svn.osgeo.org/qgis/trunk@5702 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
morb_au committed Aug 16, 2006
1 parent fa43c9d commit b61cda32487a617fe8b504f040b726571f9682c1
Showing with 20 additions and 16 deletions.
  1. +20 −16 src/gui/qgsvectorlayer.cpp
@@ -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

0 comments on commit b61cda3

Please sign in to comment.