┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2025-11-16 13:53:58 +0100
committerMéven Car <[email protected]>2026-01-20 10:45:34 +0100
commit93a6978655fc1ce9e0fd8ea08029859f71c32db9 (patch)
treea65c505d9b951317dcc4a5d5bfc16cf7f5992995 /src/dolphinmainwindow.cpp
parent38fb26518a14f68ce66a14a1197866fed865c430 (diff)
dolphinview: when creating a subfolder expand to it if in details mode
So the new folder is in view.
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 4d3fedbce..37f328e96 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1821,6 +1821,9 @@ void DolphinMainWindow::setupActions()
menu->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
m_newFileMenu->setPopupMode(QToolButton::InstantPopup);
connect(menu, &QMenu::aboutToShow, this, &DolphinMainWindow::updateNewMenu);
+ connect(m_newFileMenu, &KNewFileMenu::directoryCreated, this, [this](const QUrl &createdDirectory) {
+ activeViewContainer()->view()->expandToUrl(createdDirectory);
+ });
QAction *newWindow = KStandardAction::openNew(this, &DolphinMainWindow::openNewMainWindow, actionCollection());
newWindow->setText(i18nc("@action:inmenu File", "New &Window"));