mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Fixed: issue from last commit that doesn't clear locationbar.
This commit is contained in:
parent
234769e920
commit
6191a76be6
|
@ -75,7 +75,6 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
|
||||||
if(idx.isValid()) {
|
if(idx.isValid()) {
|
||||||
TabPosition pos = idx.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
|
TabPosition pos = idx.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
|
||||||
if(pos.windowIndex!= -1) {
|
if(pos.windowIndex!= -1) {
|
||||||
close();
|
|
||||||
activateTab(pos);
|
activateTab(pos);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -256,7 +255,6 @@ void LocationCompleterView::mouseReleaseEvent(QMouseEvent* event)
|
||||||
TabPosition pos = m_hoveredIndex.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
|
TabPosition pos = m_hoveredIndex.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
|
||||||
if(pos.windowIndex != -1) {
|
if(pos.windowIndex != -1) {
|
||||||
event->accept();
|
event->accept();
|
||||||
close();
|
|
||||||
activateTab(pos);
|
activateTab(pos);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -273,12 +271,14 @@ void LocationCompleterView::activateTab(TabPosition pos)
|
||||||
QupZilla* win = mApp->mainWindows().at(pos.windowIndex);
|
QupZilla* win = mApp->mainWindows().at(pos.windowIndex);
|
||||||
if (mApp->getWindow() != win || mApp->getWindow()->tabWidget()->currentIndex() != pos.tabIndex) {
|
if (mApp->getWindow() != win || mApp->getWindow()->tabWidget()->currentIndex() != pos.tabIndex) {
|
||||||
emit aboutToActivateTab(pos);
|
emit aboutToActivateTab(pos);
|
||||||
|
close();
|
||||||
win->tabWidget()->setCurrentIndex(pos.tabIndex);
|
win->tabWidget()->setCurrentIndex(pos.tabIndex);
|
||||||
win->show();
|
win->show();
|
||||||
win->activateWindow();
|
win->activateWindow();
|
||||||
win->raise();
|
win->raise();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
close();
|
||||||
win->weView()->setFocus();
|
win->weView()->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user