From 9be3392dbee769e69415b163c7c35dda4664791b Mon Sep 17 00:00:00 2001 From: jixiaoxu Date: Wed, 22 Sep 2021 10:29:10 +0800 Subject: [PATCH] Fix double select; --- frontend/view/best-list-view.cpp | 3 ++- frontend/view/result-view.cpp | 3 ++- frontend/view/web-search-view.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/view/best-list-view.cpp b/frontend/view/best-list-view.cpp index 7a83edc..b8b3c67 100644 --- a/frontend/view/best-list-view.cpp +++ b/frontend/view/best-list-view.cpp @@ -68,7 +68,8 @@ void BestListView::clearSelectedRow() { if (!m_is_selected) { this->blockSignals(true); - this->clearSelection(); + //this->clearSelection(); + this->setCurrentIndex(QModelIndex()); this->blockSignals(false); } } diff --git a/frontend/view/result-view.cpp b/frontend/view/result-view.cpp index c44fc84..4453690 100644 --- a/frontend/view/result-view.cpp +++ b/frontend/view/result-view.cpp @@ -198,7 +198,8 @@ void ResultView::clearSelectedRow() { if (!m_is_selected) { this->blockSignals(true); - this->clearSelection(); + //this->clearSelection(); + this->setCurrentIndex(QModelIndex()); this->blockSignals(false); } else { m_is_selected = false; diff --git a/frontend/view/web-search-view.cpp b/frontend/view/web-search-view.cpp index 5af7d8f..2c9aec1 100644 --- a/frontend/view/web-search-view.cpp +++ b/frontend/view/web-search-view.cpp @@ -58,7 +58,8 @@ void WebSearchView::clearSelectedRow() { if (!m_is_selected) { this->blockSignals(true); - this->clearSelection(); + //this->clearSelection(); + this->setCurrentIndex(QModelIndex()); this->blockSignals(false); } }