mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Fix switching focus when loading url with BrowserWindow::loadAddress
Also accept key events when handled Closes #2504
This commit is contained in:
parent
ca2b5f22be
commit
687f797f27
|
@ -664,10 +664,9 @@ void BrowserWindow::loadAddress(const QUrl &url)
|
|||
if (weView()->webTab()->isPinned()) {
|
||||
int index = m_tabWidget->addView(url, qzSettings->newTabPosition);
|
||||
weView(index)->setFocus();
|
||||
}
|
||||
else {
|
||||
weView()->setFocus();
|
||||
} else {
|
||||
weView()->load(url);
|
||||
weView()->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1292,12 +1291,14 @@ void BrowserWindow::keyPressEvent(QKeyEvent* event)
|
|||
number = m_tabWidget->count();
|
||||
}
|
||||
m_tabWidget->setCurrentIndex(number - 1);
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
if (event->modifiers() & Qt::ControlModifier && m_useSpeedDialNumberShortcuts) {
|
||||
const QUrl url = mApp->plugins()->speedDial()->urlForShortcut(number - 1);
|
||||
if (url.isValid()) {
|
||||
loadAddress(url);
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user