1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Fixed bugs 'switch to tab' switch to another window.

-see #665
This commit is contained in:
S. Razi Alavizadeh 2012-12-08 01:53:26 +03:30
parent 379f987280
commit efebfb8148

View File

@ -74,8 +74,8 @@ 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) {
activateTab(pos);
close(); close();
activateTab(pos);
return true; return true;
} }
} }
@ -255,8 +255,8 @@ 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();
activateTab(pos);
close(); close();
activateTab(pos);
} }
else { else {
QListView::mouseReleaseEvent(event); QListView::mouseReleaseEvent(event);