mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Restore the URLs of both views correctly when restoring a session
The problem was that we restored the URL of the right view while the left one is still active. When we received the signal urlChanged(KUrl& url) from the right URL navigator, we then set the URL of the active (i.e., left) view to 'url', such that both views showed the same URL. BUG: 330047 FIXED-IN: 4.12.3 REVIEW: 115406
This commit is contained in:
parent
900a4ba3b9
commit
75c0f24020
|
@ -677,6 +677,13 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group)
|
|||
Q_ASSERT(cont);
|
||||
}
|
||||
|
||||
// The right view must be activated before the URL is set. Changing
|
||||
// the URL in the right view will emit the right URL navigator's
|
||||
// urlChanged(KUrl) signal, which is connected to the changeUrl(KUrl)
|
||||
// slot. That slot will change the URL in the left view if it is still
|
||||
// active. See https://bugs.kde.org/show_bug.cgi?id=330047.
|
||||
setActiveViewContainer(cont);
|
||||
|
||||
cont->setUrl(secondaryUrl);
|
||||
const bool editable = group.readEntry(tabProperty("Secondary Editable", i), false);
|
||||
cont->urlNavigator()->setUrlEditable(editable);
|
||||
|
|
Loading…
Reference in a new issue