Skip to content
Permalink
Browse files

More switches

  • Loading branch information
elpaso committed Oct 29, 2020
1 parent 88dbb75 commit dec8b05e91ebf2148c9e2e0520cf70395a11af55
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/app/qgslayercapabilitiesmodel.cpp
@@ -145,20 +145,19 @@ QVariant QgsLayerCapabilitiesModel::headerData( int section, Qt::Orientation ori

Qt::ItemFlags QgsLayerCapabilitiesModel::flags( const QModelIndex &idx ) const
{
if ( idx.column() == LayerColumn )
{
return Qt::ItemIsEnabled;
}

QgsMapLayer *layer = mapLayer( idx );
if ( !layer )
if ( !layer && idx.column() != LayerColumn )
{
return Qt::NoItemFlags;
}
else
{
switch ( idx.column() )
switch ( static_cast<Columns>( idx.column() ) )
{
case LayerColumn:
{
return Qt::ItemIsEnabled;
}
case IdentifiableColumn:
{
if ( layer->isSpatial() )

0 comments on commit dec8b05

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