mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[layertree] Show public source tooltip for layers
This commit is contained in:
parent
3c0042115b
commit
46086b258f
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user