Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Immediately expand first group on opening history widgets
  • Loading branch information
nyalldawson committed Apr 23, 2023
1 parent 8795bd9 commit 1806c6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/history/qgshistorywidget.cpp
Expand Up @@ -38,6 +38,9 @@ QgsHistoryWidget::QgsHistoryWidget( const QString &providerId, Qgis::HistoryProv
connect( mTreeView->selectionModel(), &QItemSelectionModel::currentChanged, this, &QgsHistoryWidget::currentItemChanged );
connect( mTreeView, &QTreeView::doubleClicked, this, &QgsHistoryWidget::nodeDoubleClicked );

// expand first group (usually most recent date group)
const QModelIndex firstGroup = mProxyModel->index( 0, 0, QModelIndex() );
mTreeView->expand( firstGroup );
}

void QgsHistoryWidget::currentItemChanged( const QModelIndex &selected, const QModelIndex & )
Expand Down

0 comments on commit 1806c6e

Please sign in to comment.