Fix sorting in the volume selection dialog

This commit is contained in:
Luis Ángel San Martín
2023-06-25 12:11:10 +02:00
parent 756c514712
commit ceb230a21c
2 changed files with 2 additions and 5 deletions

View File

@ -58,11 +58,7 @@ SelectVolume::SelectVolume(QWidget *parent)
filterEdit->setClearButtonEnabled(true);
connect(filterEdit, &QLineEdit::textChanged, proxyModel, &QSortFilterProxyModel::setFilterFixedString);
connect(tableVolumes->horizontalHeader(), &QHeaderView::sectionClicked, this,
[=](int index) { tableVolumes->horizontalHeader()->sortIndicatorSection() == index ? tableVolumes->sortByColumn(index, tableVolumes->horizontalHeader()->sortIndicatorOrder() == Qt::AscendingOrder ? Qt::DescendingOrder : Qt::AscendingOrder)
: tableVolumes->sortByColumn(index, Qt::AscendingOrder); });
// connections
connect(tableVolumes->horizontalHeader(), &QHeaderView::sortIndicatorChanged, tableVolumes, &QTableView::sortByColumn);
connect(tableVolumes, &QAbstractItemView::clicked, this, &SelectVolume::loadVolumeInfo);
paginator->setCustomLabel(tr("volumes"));