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

Fixed: issue from last commit that doesn't clear locationbar.

This commit is contained in:
S. Razi Alavizadeh 2012-12-08 02:19:12 +03:30
parent 234769e920
commit 6191a76be6

View File

@ -75,7 +75,6 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
if(idx.isValid()) {
TabPosition pos = idx.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
if(pos.windowIndex!= -1) {
close();
activateTab(pos);
return true;
}
@ -256,7 +255,6 @@ void LocationCompleterView::mouseReleaseEvent(QMouseEvent* event)
TabPosition pos = m_hoveredIndex.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
if(pos.windowIndex != -1) {
event->accept();
close();
activateTab(pos);
}
else {
@ -273,12 +271,14 @@ void LocationCompleterView::activateTab(TabPosition pos)
QupZilla* win = mApp->mainWindows().at(pos.windowIndex);
if (mApp->getWindow() != win || mApp->getWindow()->tabWidget()->currentIndex() != pos.tabIndex) {
emit aboutToActivateTab(pos);
close();
win->tabWidget()->setCurrentIndex(pos.tabIndex);
win->show();
win->activateWindow();
win->raise();
}
else {
close();
win->weView()->setFocus();
}
}