diff --git a/frontend/control/stack-pages/search-page-section.cpp b/frontend/control/stack-pages/search-page-section.cpp index 9f1c911..e50bec9 100644 --- a/frontend/control/stack-pages/search-page-section.cpp +++ b/frontend/control/stack-pages/search-page-section.cpp @@ -370,6 +370,7 @@ void ResultArea::setSelectionInfo(QString &pluginID) m_selectedPluginID = pluginID; if (m_selectedPluginID != m_bestListWidget->getWidgetName()) { m_bestListWidget->clearResultSelection(); + m_isClicked = true; } } @@ -464,11 +465,12 @@ void ResultArea::initConnections() m_detail_open_state = false; m_isSelected = false; m_selectedPluginID = ""; + m_isClicked = false; }); connect(m_bestListWidget, &BestListWidget::sizeChanged, this, &ResultArea::onWidgetSizeChanged); connect(m_bestListWidget, &BestListWidget::sizeChanged, this, [=] () { QModelIndex index = m_bestListWidget->getModlIndex(0, 0); - if (index.isValid() && (m_selectedPluginID == m_bestListWidget->getWidgetName() || m_selectedPluginID.isEmpty())) { + if (index.isValid() && !m_isClicked) { m_bestListWidget->setResultSelection(index); m_selectedPluginID = m_bestListWidget->getWidgetName(); m_isSelected = true; diff --git a/frontend/control/stack-pages/search-page-section.h b/frontend/control/stack-pages/search-page-section.h index bc0d266..00b1f73 100644 --- a/frontend/control/stack-pages/search-page-section.h +++ b/frontend/control/stack-pages/search-page-section.h @@ -94,6 +94,7 @@ private: bool m_isSelected = false; QString m_selectedPluginID; QPoint m_pressPoint; + bool m_isClicked =false; Q_SIGNALS: void startSearch(const QString &);