mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-18 14:55:49 -04:00
Merge 3f12af5323a26b9835c09cc27ab447edb4777618 into af2479da8dc0ff0c7104c4ccde1715b1c562dfdc
This commit is contained in:
commit
a40b5fff06
@ -253,6 +253,11 @@ void ReportsWidgetHealthcheck::showEvent(QShowEvent* event)
|
||||
|
||||
void ReportsWidgetHealthcheck::calculateHealth()
|
||||
{
|
||||
// Save current sort order before clearing the model so we can restore it later
|
||||
int sortColumn = m_ui->healthcheckTableView->horizontalHeader()->sortIndicatorSection();
|
||||
Qt::SortOrder sortOrder = m_ui->healthcheckTableView->horizontalHeader()->sortIndicatorOrder();
|
||||
|
||||
// Safe to clear
|
||||
m_referencesModel->clear();
|
||||
|
||||
// Perform the health check
|
||||
@ -277,9 +282,11 @@ void ReportsWidgetHealthcheck::calculateHealth()
|
||||
} else {
|
||||
m_referencesModel->setHorizontalHeaderLabels(QStringList() << tr("") << tr("Title") << tr("Path") << tr("Score")
|
||||
<< tr("Reason"));
|
||||
m_ui->healthcheckTableView->sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
// Restore sorting options that was stored before the model was cleared
|
||||
m_ui->healthcheckTableView->sortByColumn(sortColumn, sortOrder);
|
||||
|
||||
m_ui->healthcheckTableView->resizeColumnsToContents();
|
||||
m_ui->healthcheckTableView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user