From 7cb193de1074e226b6fb3fe0f71da577b54f3589 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Wed, 16 Jul 2014 09:12:16 +0200 Subject: [PATCH] Fix regression concerning the "Places" selector in the location bar This commit ensures that the selector is visible in all location bars if and only if the Places Panel is hidden. It fixes a regression caused by commit 6a98d83312ff2b14ab878e1427bbace3b683eacc. BUG: 337389 FIXED-IN: 4.14.0 REVIEW: 119238 --- src/dolphinmainwindow.cpp | 3 ++- src/dolphintabpage.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 0c48928bf4..db4ad07657 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -770,7 +770,8 @@ void DolphinMainWindow::togglePanelLockState() void DolphinMainWindow::slotPlacesPanelVisibilityChanged(bool visible) { foreach (DolphinTabPage* tabPage, m_viewTab) { - tabPage->setPlacesSelectorVisible(visible); + // The Places selector in the location bar should be shown if and only if the Places panel is hidden. + tabPage->setPlacesSelectorVisible(!visible); } } diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index c8e4263359..82be6d59c1 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -76,6 +76,10 @@ void DolphinTabPage::setSplitViewEnabled(bool enabled) if (enabled) { const KUrl& url = m_primaryViewContainer->url(); m_secondaryViewContainer = createViewContainer(url); + + const bool placesSelectorVisible = m_primaryViewContainer->urlNavigator()->isPlacesSelectorVisible(); + m_secondaryViewContainer->urlNavigator()->setPlacesSelectorVisible(placesSelectorVisible); + m_splitter->addWidget(m_secondaryViewContainer); m_secondaryViewContainer->show(); m_secondaryViewContainer->setActive(true);