diff options
| author | Felix Ernst <[email protected]> | 2021-05-17 14:52:45 +0200 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2021-05-17 14:52:45 +0200 |
| commit | 98e1fb66d054d188a7c07683e7e6768b84f63605 (patch) | |
| tree | 0fe8517d117a73e799283c17a2602da01376dc1a /src/dolphinmainwindow.cpp | |
| parent | 75d1d25d7e64dc4c1d6557b7aca90577fc28d305 (diff) | |
Fix primary view changing folder for the closing animation
This commit fixes a bug which made it so an UrlNavigator that was
disconnected from a viewContainer would still indirectly control
the viewContainer because of a dubious connection created in
DolphinMainWindow.
Instead the internal UrlNavigator of the viewContainer is used
which is always connected to its own viewContainer.
This way the the supposedly disconnected primary UrlNavigator will
actually not affect the old disconnected viewContainer that is
currently being closed.
BUG: 437080
FIXED-IN: 21.08
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 87deb8ca6..c2c4ae703 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1274,6 +1274,7 @@ void DolphinMainWindow::activeViewChanged(DolphinViewContainer* viewContainer) // view and url navigator) and main window. oldViewContainer->disconnect(this); oldViewContainer->view()->disconnect(this); + oldViewContainer->urlNavigatorInternalWithHistory()->disconnect(this); auto navigators = static_cast<DolphinNavigatorsWidgetAction *> (actionCollection()->action(QStringLiteral("url_navigators"))); navigators->primaryUrlNavigator()->disconnect(this); @@ -2144,15 +2145,17 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) connect(view, &DolphinView::goUpRequested, this, &DolphinMainWindow::goUp); + connect(container->urlNavigatorInternalWithHistory(), &KUrlNavigator::urlChanged, + this, &DolphinMainWindow::changeUrl); + connect(container->urlNavigatorInternalWithHistory(), &KUrlNavigator::historyChanged, + this, &DolphinMainWindow::updateHistory); + auto navigators = static_cast<DolphinNavigatorsWidgetAction *> (actionCollection()->action(QStringLiteral("url_navigators"))); - const KUrlNavigator *navigator = m_tabWidget->currentTabPage()->primaryViewActive() ? navigators->primaryUrlNavigator() : navigators->secondaryUrlNavigator(); - connect(navigator, &KUrlNavigator::urlChanged, - this, &DolphinMainWindow::changeUrl); QAction *editableLocactionAction = actionCollection()->action(QStringLiteral("editable_location")); editableLocactionAction->setChecked(navigator->isUrlEditable()); connect(navigator, &KUrlNavigator::editableStateChanged, @@ -2160,10 +2163,6 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) connect(navigator, &KUrlNavigator::tabRequested, this, &DolphinMainWindow::openNewTab); - disconnect(m_updateHistoryConnection); - m_updateHistoryConnection = connect( - container->urlNavigatorInternalWithHistory(), &KUrlNavigator::historyChanged, - this, &DolphinMainWindow::updateHistory); } void DolphinMainWindow::updateSplitAction() |
