mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Fix commit a2ae800335
. :(
Do not attempt to change focus when the active view is not the current one. Fixes location bar address being changed when opening URLs in a background tab.
This commit is contained in:
parent
985865bf10
commit
5fa3dbc49f
1 changed files with 11 additions and 10 deletions
|
@ -518,19 +518,20 @@ void KonqView::slotRequestFocus( KParts::ReadOnlyPart * )
|
|||
void KonqView::setLoading( bool loading, bool hasPending /*= false*/)
|
||||
{
|
||||
//kDebug() << "loading=" << loading << "hasPending=" << hasPending;
|
||||
if (loading) {
|
||||
// Make sure the focus is restored on the part's widget and not the combo
|
||||
// box if it starts loading a request. See #304933.
|
||||
QWidget* partWidget = (m_pPart ? m_pPart->widget() : 0);
|
||||
if (partWidget && !partWidget->hasFocus()) {
|
||||
//kDebug() << "SET FOCUS on the widget";
|
||||
partWidget->setFocus();
|
||||
}
|
||||
}
|
||||
m_bLoading = loading;
|
||||
m_bPendingRedirection = hasPending;
|
||||
if ( m_pMainWindow->currentView() == this )
|
||||
if ( m_pMainWindow->currentView() == this ) {
|
||||
m_pMainWindow->updateToolBarActions( hasPending );
|
||||
// Make sure the focus is restored on the part's widget and not the combo
|
||||
// box if it starts loading a request. See #304933.
|
||||
if (loading) {
|
||||
QWidget* partWidget = (m_pPart ? m_pPart->widget() : 0);
|
||||
if (partWidget && !partWidget->hasFocus()) {
|
||||
//kDebug() << "SET FOCUS on the widget";
|
||||
partWidget->setFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_pMainWindow->viewManager()->setLoading( this, loading || hasPending );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue