1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[LocationCompleter] Pause updates when removing items from completer

Also adjust the size of popup after removing items + close it after
removing last item.
This commit is contained in:
nowrep 2014-03-16 17:20:32 +01:00
parent 20cd658274
commit a9eba60da2

View File

@ -210,7 +210,17 @@ void LocationCompleter::indexDeleteRequested(const QModelIndex &index)
mApp->history()->deleteHistoryEntry(id);
}
s_view->setUpdatesEnabled(false);
s_model->removeRow(index.row(), index.parent());
s_view->setUpdatesEnabled(true);
// Close popup when removing last item
if (s_model->rowCount() == 0) {
closePopup();
}
else {
adjustPopupSize();
}
}
void LocationCompleter::switchToTab(BrowserWindow* window, int tab)