[layertree] Show public source tooltip for layers

This commit is contained in:
Martin Dobias 2014-05-22 18:20:47 +07:00
parent 3c0042115b
commit 46086b258f

View File

@ -238,6 +238,14 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
f.setBold( true );
return f;
}
else if ( role == Qt::ToolTipRole )
{
if ( QgsLayerTree::isLayer( node ) )
{
if ( QgsMapLayer* layer = QgsLayerTree::toLayer( node )->layer() )
return layer->publicSource();
}
}
return QVariant();
}