mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 09:20:13 +00:00
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
This commit is contained in:
parent
75d1d25d7e
commit
98e1fb66d0
|
@ -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()
|
||||
|
|
|
@ -671,9 +671,6 @@ private:
|
|||
KToolBarPopupAction* m_backAction;
|
||||
KToolBarPopupAction* m_forwardAction;
|
||||
|
||||
/** Makes sure that only one object is ever connected to the history. */
|
||||
QMetaObject::Connection m_updateHistoryConnection;
|
||||
|
||||
QMenu m_searchTools;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue