Skip to content
Permalink
Browse files

enable Toggle editing button depending on layer type (fix #4965)

  • Loading branch information
alexbruy committed Feb 8, 2012
1 parent bd51944 commit a080538aec97b6685a8cbadcf2446bbde6daa30d
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgisapp.cpp
@@ -6164,9 +6164,10 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
//start editing/stop editing
if ( dprovider->capabilities() & QgsVectorDataProvider::EditingCapabilities )
{
mActionToggleEditing->setEnabled( !vlayer->isReadOnly() );
bool canChangeAttributes = dprovider->capabilities() & QgsVectorDataProvider::ChangeAttributeValues;
mActionToggleEditing->setEnabled( canChangeAttributes && !vlayer->isReadOnly() );
mActionToggleEditing->setChecked( vlayer->isEditable() );
mActionSaveEdits->setEnabled( vlayer->isEditable() );
mActionSaveEdits->setEnabled( canChangeAttributes && vlayer->isEditable() );
}
else
{

0 comments on commit a080538

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