mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
PG source select: remove initial newlines from table comments
This commit is contained in:
parent
5ec15b8ea2
commit
312ac93b58
@ -102,7 +102,10 @@ void QgsPgTableModel::addTableEntry( const QgsPostgresLayerProperty &layerProper
|
||||
if ( ! layerProperty.tableComment.isEmpty() )
|
||||
{
|
||||
// word wrap
|
||||
commentItem->setToolTip( QStringLiteral( "<span>%1</span>" ).arg( layerProperty.tableComment ).replace( '\n', QStringLiteral( "<br/>" ) ) );
|
||||
QString commentText { layerProperty.tableComment };
|
||||
commentText.replace( QRegularExpression( QStringLiteral( "^\n*" ) ), QString() );
|
||||
commentItem->setText( commentText );
|
||||
commentItem->setToolTip( QStringLiteral( "<span>%1</span>" ).arg( commentText.replace( '\n', QStringLiteral( "<br/>" ) ) ) );
|
||||
commentItem->setTextAlignment( Qt::AlignTop );
|
||||
}
|
||||
QStandardItem *geomItem = new QStandardItem( layerProperty.geometryColName );
|
||||
|
Loading…
x
Reference in New Issue
Block a user