Skip to content

Commit

Permalink
Show cell values in tooltips in attribute table
Browse files Browse the repository at this point in the history
Otherwise long values can be truncated and hard to read
  • Loading branch information
nyalldawson committed Dec 3, 2017
1 parent 5b05699 commit 484a611
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/attributetable/qgsattributetablemodel.cpp
Expand Up @@ -596,6 +596,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
if ( !index.isValid() ||
( role != Qt::TextAlignmentRole
&& role != Qt::DisplayRole
&& role != Qt::ToolTipRole
&& role != Qt::EditRole
&& role != SortRole
&& role != FeatureIdRole
Expand Down Expand Up @@ -647,6 +648,7 @@ QVariant QgsAttributeTableModel::data( const QModelIndex &index, int role ) cons
switch ( role )
{
case Qt::DisplayRole:
case Qt::ToolTipRole:
return mFieldFormatters.at( index.column() )->representValue( layer(), fieldId, mWidgetConfigs.at( index.column() ),
mAttributeWidgetCaches.at( index.column() ), val );

Expand Down

0 comments on commit 484a611

Please sign in to comment.