Skip to content
Permalink
Browse files

Removes 'toggle editing' from context menu of read-only layers. Fix #…

  • Loading branch information
suricactus authored and nyalldawson committed Dec 21, 2020
1 parent ccd5c28 commit a2beeba0001c59f58e17749a2161a4de8ea26205
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgsapplayertreeviewmenuprovider.cpp
@@ -238,8 +238,9 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()

// allow editing
const QgsVectorDataProvider *provider = vlayer->dataProvider();
if ( provider &&
( provider->capabilities() & QgsVectorDataProvider::EditingCapabilities ) )
if ( provider
&& ( provider->capabilities() & QgsVectorDataProvider::EditingCapabilities )
&& !vlayer->readOnly() )
{
if ( toggleEditingAction )
{

0 comments on commit a2beeba

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