diff options
| author | Nate Graham <[email protected]> | 2021-09-28 13:57:14 -0600 |
|---|---|---|
| committer | Nate Graham <[email protected]> | 2021-09-28 13:57:14 -0600 |
| commit | 0c44dfe2b1c143fae323b9ff4bd415cdd69c1086 (patch) | |
| tree | 405c66d754a53d3b76901c62aa64f2e155ff6c45 | |
| parent | d3f427a6da1b117c85b1080bf198ae4758d00e8e (diff) | |
| parent | fa8d9de4d866070acadd57178d20144bb5e62a0a (diff) | |
Merge branch 'release/21.08'
| -rw-r--r-- | src/dolphinmainwindow.cpp | 14 | ||||
| -rw-r--r-- | src/dolphinmainwindow.h | 3 | ||||
| -rw-r--r-- | src/settings/dolphin_generalsettings.kcfg | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e0d6c4725..ec15bb978 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -214,6 +214,9 @@ DolphinMainWindow::DolphinMainWindow() : connect(&m_fileItemActions, &KFileItemActions::error, this, [this](const QString &errorMessage) { showErrorMessage(errorMessage); }); + + connect(GeneralSettings::self(), &GeneralSettings::splitViewChanged, + this, &DolphinMainWindow::slotSplitViewChanged); } DolphinMainWindow::~DolphinMainWindow() @@ -437,6 +440,12 @@ void DolphinMainWindow::openNewTab(const QUrl& url) m_tabWidget->openNewTab(url, QUrl()); } +void DolphinMainWindow::slotSplitViewChanged() +{ + m_tabWidget->currentTabPage()->setSplitViewEnabled(GeneralSettings::splitView(), WithAnimation); + updateSplitAction(); +} + void DolphinMainWindow::openInNewTab() { const KFileItemList& list = m_activeViewContainer->view()->selectedItems(); @@ -2101,11 +2110,6 @@ void DolphinMainWindow::refreshViews() m_tabWidget->refreshViews(); if (GeneralSettings::modifiedStartupSettings()) { - // The startup settings have been changed by the user (see bug #254947). - // Synchronize the split-view setting with the active view: - const bool splitView = GeneralSettings::splitView(); - m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView, WithAnimation); - updateSplitAction(); updateWindowTitle(); } diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 3a29d1c0a..46515cc8b 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -171,6 +171,9 @@ public Q_SLOTS: */ void openNewTab(const QUrl& url); + /** @see GeneralSettings::splitViewChanged() */ + void slotSplitViewChanged(); + Q_SIGNALS: /** * Is sent if the selection of the currently active view has diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg index 728d11634..08f01d72c 100644 --- a/src/settings/dolphin_generalsettings.kcfg +++ b/src/settings/dolphin_generalsettings.kcfg @@ -9,6 +9,7 @@ <include>KCompletion</include> <kcfgfile name="dolphinrc"/> <signal name="sortingChoiceChanged" /> + <signal name="splitViewChanged" /> <group name="General"> <entry name="EditableUrl" type="Bool"> <label>Should the URL be editable for the user</label> @@ -49,6 +50,7 @@ <entry name="SplitView" type="Bool"> <label>Split the view into two panes</label> <default>false</default> + <emit signal="splitViewChanged" /> </entry> <entry name="FilterBar" type="Bool"> <label>Should the filter bar be shown</label> |
