From ceb230a21ce52fffd8598effedc840199eb14f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 25 Jun 2023 12:11:10 +0200 Subject: [PATCH] Fix sorting in the volume selection dialog --- CHANGELOG.md | 1 + YACReaderLibrary/comic_vine/select_volume.cpp | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f348d130..9d5daa9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) * New `Recent` smart list, it will show recent comics added. * Try to detect changed files with the same name on libraries updates, there is also a new setting to decide if the modified date of a file should be used as an indicator to know if the file has been changed since it was added (disabled by default). * Fix alphanumeric navigation in the folders tree view. Shortcuts were interfering the default behaviour, now some shortcuts will be ignored if the folders tree has the focus. +* Fix sorting in the Comic Vine series selection dialog. ### All Apps * New icons for macos. diff --git a/YACReaderLibrary/comic_vine/select_volume.cpp b/YACReaderLibrary/comic_vine/select_volume.cpp index 3a745ba8..7ff04d92 100644 --- a/YACReaderLibrary/comic_vine/select_volume.cpp +++ b/YACReaderLibrary/comic_vine/select_volume.cpp @@ -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"));