LocationCompleter: Only update original text when first item is selected

Fixes issue where search/visit item would be incorrectly updated after
deleting item from completions.
remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent c97d077f67
commit 89aa7259f9
  1. 8
      src/lib/navigation/completer/locationcompleter.cpp

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -378,8 +378,10 @@ void LocationCompleter::adjustPopupSize()
const int maxItemsCount = 12;
const int popupHeight = s_view->sizeHintForRow(0) * qMin(maxItemsCount, s_model->rowCount()) + 2 * s_view->frameWidth();
m_originalText = m_locationBar->text();
s_view->setOriginalText(m_originalText);
if (s_view->currentIndex().row() == 0) {
m_originalText = m_locationBar->text();
s_view->setOriginalText(m_originalText);
}
s_view->resize(s_view->width(), popupHeight);
s_view->show();

Loading…
Cancel
Save