1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

LocationCompleter: Call closePopup+clearCompletion also in indexActivated

This commit is contained in:
David Rosca 2018-01-26 10:54:52 +01:00
parent 3469d5b114
commit 4ad5900604
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -204,6 +204,11 @@ void LocationCompleter::indexActivated(const QModelIndex &index)
{
Q_ASSERT(index.isValid());
closePopup();
// Clear locationbar
emit clearCompletion();
bool ok;
const int tabPos = index.data(LocationCompleterModel::TabPositionTabRole).toInt(&ok);
@ -321,11 +326,6 @@ void LocationCompleter::switchToTab(BrowserWindow* window, int tab)
Q_ASSERT(window);
Q_ASSERT(tab >= 0);
closePopup();
// Clear locationbar
emit clearCompletion();
TabWidget* tabWidget = window->tabWidget();
if (window->isActiveWindow() || tabWidget->currentIndex() != tab) {