diff --git a/ui/zenoedit/nodesys/searchview.cpp b/ui/zenoedit/nodesys/searchview.cpp index 731fcc3cff..3a6fc2a9b6 100644 --- a/ui/zenoedit/nodesys/searchview.cpp +++ b/ui/zenoedit/nodesys/searchview.cpp @@ -110,8 +110,8 @@ void SearchResultWidget::resizeCount(int count) void SearchResultWidget::moveToTop() { - setCurrentIndex(model()->index(0, 0)); clearSelection(); + setCurrentIndex(model()->index(0, 0)); } void SearchResultWidget::keyPressEvent(QKeyEvent* event) diff --git a/ui/zenoedit/nodesys/zenonewmenu.cpp b/ui/zenoedit/nodesys/zenonewmenu.cpp index e09cf38eb6..6867c2c15d 100644 --- a/ui/zenoedit/nodesys/zenonewmenu.cpp +++ b/ui/zenoedit/nodesys/zenonewmenu.cpp @@ -104,6 +104,13 @@ bool ZenoNewnodeMenu::eventFilter(QObject* watched, QEvent* event) return true; } } + else if (watched == m_searchEdit && (pKeyEvent->key() == Qt::Key_Return || pKeyEvent->key() == Qt::Key_Enter)) + { + if (m_searchView->isVisible() && m_searchView->count() > 0) + { + emit m_searchView->pressed(m_searchView->currentIndex()); + } + } } else if (watched == m_searchEdit && event->type() == QEvent::Show) {