test to fix checkboxes in combobox

This commit is contained in:
Denis Rouzaud 2014-04-04 10:14:26 +02:00
parent a4fc1ba280
commit a95fedbbf0

View File

@ -148,7 +148,7 @@ QVariant QgsMapLayerModel::data( const QModelIndex &index, int role ) const
return layer->id();
}
if ( role == Qt::CheckStateRole )
if ( role == Qt::CheckStateRole && mItemCheckable )
{
QgsMapLayer* layer = static_cast<QgsMapLayer*>( index.internalPointer() );
return mLayersChecked[layer->id()];