Skip to content

Commit

Permalink
[layouts] Auto select first result in validity check results
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 20, 2019
1 parent abc9f47 commit ebdda22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/qgsvaliditycheckresultswidget.cpp
Expand Up @@ -110,6 +110,14 @@ void QgsValidityCheckResultsWidget::setResults( const QList<QgsValidityCheckResu

connect( mResultsListView->selectionModel(), &QItemSelectionModel::currentChanged, this, &QgsValidityCheckResultsWidget::selectionChanged );

if ( mResultsModel->rowCount() > 0 )
{
// auto select first result in list
const QModelIndex firstResult( mResultsModel->index( 0, 0, QModelIndex() ) );
mResultsListView->selectionModel()->select( firstResult, QItemSelectionModel::ClearAndSelect );
selectionChanged( firstResult, QModelIndex() );
}

mDescriptionLabel->hide();
}

Expand Down

0 comments on commit ebdda22

Please sign in to comment.