Skip to content

Commit

Permalink
Only set tooltip if text is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 12, 2020
1 parent 23f8640 commit 3b941e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
Expand Up @@ -365,7 +365,8 @@ void QgsValueRelationWidgetWrapper::populate( )
for ( const QgsValueRelationFieldFormatter::ValueRelationItem &element : qgis::as_const( mCache ) )
{
whileBlocking( mComboBox )->addItem( element.value, element.key );
mComboBox->setItemData( mComboBox->count() - 1, element.description, Qt::ToolTipRole );
if ( !element.description.isEmpty() )
mComboBox->setItemData( mComboBox->count() - 1, element.description, Qt::ToolTipRole );
}

}
Expand Down

0 comments on commit 3b941e4

Please sign in to comment.