Grey out disabled symbol layers in tree

This commit is contained in:
Nyall Dawson 2016-10-17 20:21:23 +10:00
parent a6148deb30
commit 2835cad6eb

View File

@ -191,6 +191,16 @@ class SymbolLayerItem : public QStandardItem
}
}
}
else if ( role == Qt::ForegroundRole && mIsLayer )
{
QBrush brush( Qt::black, Qt::SolidPattern );
if ( !mLayer->enabled() )
{
brush.setColor( Qt::lightGray );
}
return brush;
}
// if ( role == Qt::SizeHintRole )
// return QVariant( QSize( 32, 32 ) );
if ( role == Qt::CheckStateRole )