Skip to content

Commit

Permalink
[layertree] Show public source tooltip for layers
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 22, 2014
1 parent 3c00421 commit 46086b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/layertree/qgslayertreemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 46086b2

Please sign in to comment.