mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Fix closing a secondary viewContainer on startup settings change
Apply split view settings only when changing the corresponding option. BUG: 426221 FIXED-IN: 21.08.2
This commit is contained in:
parent
8bf64cf8b1
commit
fa8d9de4d8
|
@ -216,6 +216,9 @@ DolphinMainWindow::DolphinMainWindow() :
|
||||||
showErrorMessage(errorMessage);
|
showErrorMessage(errorMessage);
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
connect(GeneralSettings::self(), &GeneralSettings::splitViewChanged,
|
||||||
|
this, &DolphinMainWindow::slotSplitViewChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
DolphinMainWindow::~DolphinMainWindow()
|
DolphinMainWindow::~DolphinMainWindow()
|
||||||
|
@ -439,6 +442,12 @@ void DolphinMainWindow::openNewTab(const QUrl& url)
|
||||||
m_tabWidget->openNewTab(url, QUrl());
|
m_tabWidget->openNewTab(url, QUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DolphinMainWindow::slotSplitViewChanged()
|
||||||
|
{
|
||||||
|
m_tabWidget->currentTabPage()->setSplitViewEnabled(GeneralSettings::splitView(), WithAnimation);
|
||||||
|
updateSplitAction();
|
||||||
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::openInNewTab()
|
void DolphinMainWindow::openInNewTab()
|
||||||
{
|
{
|
||||||
const KFileItemList& list = m_activeViewContainer->view()->selectedItems();
|
const KFileItemList& list = m_activeViewContainer->view()->selectedItems();
|
||||||
|
@ -2096,11 +2105,6 @@ void DolphinMainWindow::refreshViews()
|
||||||
m_tabWidget->refreshViews();
|
m_tabWidget->refreshViews();
|
||||||
|
|
||||||
if (GeneralSettings::modifiedStartupSettings()) {
|
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();
|
updateWindowTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,9 @@ public Q_SLOTS:
|
||||||
*/
|
*/
|
||||||
void openNewTab(const QUrl& url);
|
void openNewTab(const QUrl& url);
|
||||||
|
|
||||||
|
/** @see GeneralSettings::splitViewChanged() */
|
||||||
|
void slotSplitViewChanged();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
/**
|
/**
|
||||||
* Is sent if the selection of the currently active view has
|
* Is sent if the selection of the currently active view has
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<include>KCompletion</include>
|
<include>KCompletion</include>
|
||||||
<kcfgfile name="dolphinrc"/>
|
<kcfgfile name="dolphinrc"/>
|
||||||
<signal name="sortingChoiceChanged" />
|
<signal name="sortingChoiceChanged" />
|
||||||
|
<signal name="splitViewChanged" />
|
||||||
<group name="General">
|
<group name="General">
|
||||||
<entry name="EditableUrl" type="Bool">
|
<entry name="EditableUrl" type="Bool">
|
||||||
<label>Should the URL be editable for the user</label>
|
<label>Should the URL be editable for the user</label>
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
<entry name="SplitView" type="Bool">
|
<entry name="SplitView" type="Bool">
|
||||||
<label>Split the view into two panes</label>
|
<label>Split the view into two panes</label>
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
|
<emit signal="splitViewChanged" />
|
||||||
</entry>
|
</entry>
|
||||||
<entry name="FilterBar" type="Bool">
|
<entry name="FilterBar" type="Bool">
|
||||||
<label>Should the filter bar be shown</label>
|
<label>Should the filter bar be shown</label>
|
||||||
|
|
Loading…
Reference in a new issue