Skip to content

Commit

Permalink
Show field alias in tooltip in form editor tab
Browse files Browse the repository at this point in the history
(cherry-picked from 9a1f129)
  • Loading branch information
nyalldawson committed Aug 16, 2018
1 parent 8e53a65 commit d5fd78c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgsattributesformproperties.cpp
Expand Up @@ -105,6 +105,13 @@ void QgsAttributesFormProperties::initAvailableWidgetsTree()

item->setData( 0, FieldConfigRole, cfg );
item->setData( 0, FieldNameRole, field.name() );

QString tooltip;
if ( !field.alias().isEmpty() )
tooltip = tr( "%1 (%2)" ).arg( field.name(), field.alias() );
else
tooltip = field.name();
item->setToolTip( 0, tooltip );
}
catitem->setExpanded( true );

Expand Down

0 comments on commit d5fd78c

Please sign in to comment.