diff options
| author | Loren Burkholder <[email protected]> | 2023-11-30 23:20:24 -0500 |
|---|---|---|
| committer | Loren Burkholder <[email protected]> | 2024-01-18 23:29:23 +0000 |
| commit | aaa95d5278493d48faa877a1c8acdd54169ced5b (patch) | |
| tree | 978de840f8675b7b67c241b78f2595fabba52c22 | |
| parent | 830dd0148a26d91ba7f3e0316da1e021fe2b83e4 (diff) | |
Remove popout action from toolbar when split screen is closed
It's pointless to show the popout action when splitscreen is closed,
so we'll remove it as a child of the splitscreen action whenever the
screen is not split.
| -rw-r--r-- | src/dolphinmainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e3591bcaf..967d4560f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1855,7 +1855,6 @@ void DolphinMainWindow::setupActions() "view out into a new window.")); popoutSplit->setIcon(QIcon::fromTheme(QStringLiteral("window-new"))); actionCollection()->setDefaultShortcut(popoutSplit, Qt::SHIFT | Qt::Key_F3); - m_splitViewAction->addAction(popoutSplit); connect(popoutSplit, &QAction::triggered, this, &DolphinMainWindow::popoutSplitView); QAction *stashSplit = actionCollection()->addAction(QStringLiteral("split_stash")); @@ -2553,12 +2552,14 @@ void DolphinMainWindow::updateSplitActions() popoutSplitAction->setToolTip(i18nc("@info", "Move right split view to a new window")); } popoutSplitAction->setEnabled(true); + m_splitViewAction->addAction(popoutSplitAction); } else { m_splitViewAction->setText(i18nc("@action:intoolbar Split view", "Split")); m_splitViewAction->setToolTip(i18nc("@info", "Split view")); m_splitViewAction->setIcon(QIcon::fromTheme(QStringLiteral("view-right-new"))); popoutSplitAction->setText(i18nc("@action:intoolbar Move active split view to a new window", "Pop out")); popoutSplitAction->setEnabled(false); + m_splitViewAction->removeAction(popoutSplitAction); } // Update state from toolbar action |
