LocationCompleter: Fix popup opening with suggestions after it was closed

remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent b9294e02bb
commit 5ee0623d32
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
  1. 14
      src/lib/navigation/completer/locationcompleter.cpp

@ -68,7 +68,6 @@ bool LocationCompleter::isVisible() const
void LocationCompleter::closePopup()
{
m_popupClosed = true;
s_view->close();
}
@ -140,6 +139,7 @@ void LocationCompleter::refreshJobFinished()
void LocationCompleter::slotPopupClosed()
{
m_popupClosed = true;
m_oldSuggestions.clear();
disconnect(s_view, SIGNAL(closed()), this, SLOT(slotPopupClosed()));
@ -179,7 +179,9 @@ void LocationCompleter::addSuggestions(const QStringList &suggestions)
s_model->addCompletions(items);
m_oldSuggestions = suggestions;
showPopup();
if (!m_popupClosed) {
showPopup();
}
}
void LocationCompleter::currentChanged(const QModelIndex &index)
@ -275,13 +277,7 @@ void LocationCompleter::indexDeleteRequested(const QModelIndex &index)
s_model->removeRow(index.row(), index.parent());
s_view->setUpdatesEnabled(true);
// Close popup when removing last item
if (s_model->rowCount() == 0) {
closePopup();
}
else {
showPopup();
}
showPopup();
}
LoadRequest LocationCompleter::createLoadRequest(const QModelIndex &index)

Loading…
Cancel
Save