Show cell values in tooltips in attribute table

Otherwise long values can be truncated and hard to read
This commit is contained in:
Nyall Dawson 2017-12-03 14:57:38 +10:00
parent 5b05699fc9
commit 484a61154f

View File

@ -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
@ -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 );