Skip to content

Commit 1806c6e

Browse files
committedApr 23, 2023
Immediately expand first group on opening history widgets
1 parent 8795bd9 commit 1806c6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/gui/history/qgshistorywidget.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ QgsHistoryWidget::QgsHistoryWidget( const QString &providerId, Qgis::HistoryProv
3838
connect( mTreeView->selectionModel(), &QItemSelectionModel::currentChanged, this, &QgsHistoryWidget::currentItemChanged );
3939
connect( mTreeView, &QTreeView::doubleClicked, this, &QgsHistoryWidget::nodeDoubleClicked );
4040

41+
// expand first group (usually most recent date group)
42+
const QModelIndex firstGroup = mProxyModel->index( 0, 0, QModelIndex() );
43+
mTreeView->expand( firstGroup );
4144
}
4245

4346
void QgsHistoryWidget::currentItemChanged( const QModelIndex &selected, const QModelIndex & )

0 commit comments

Comments
 (0)
Please sign in to comment.