From de4502909053fbea3295409540a97a5c74ca6611 Mon Sep 17 00:00:00 2001 From: Geri Gelóczi Date: Thu, 5 Mar 2026 10:14:40 +0100 Subject: Revert "!1026" Revert "!1026" The behavior change introduced in !1026 significantly alters the new folder creation behavior in Dolphin and has proven controversial among users. It likely requires additional design discussion and iteration to arrive at a solution that works well in all cases. Until a more robust solution is agreed upon, revert the change and restore the previous behavior. BUG: 516341 --- src/dolphinmainwindow.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 110bef2f3..f276d88d4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -848,14 +848,7 @@ void DolphinMainWindow::createDirectory() // just check if we are already running one. This prevents opening multiple // dialogs. BUG:481401 if (!m_newFileMenu->isCreateDirectoryRunning()) { - QUrl targetDirectory = activeViewContainer()->view()->url(); - if (const auto itemOpt = activeViewContainer()->view()->firstSelectedItem()) { - if (itemOpt->isDir()) { - targetDirectory = itemOpt->url(); - } - } - - m_newFileMenu->setWorkingDirectory(targetDirectory); + m_newFileMenu->setWorkingDirectory(activeViewContainer()->url()); m_newFileMenu->createDirectory(); } } @@ -864,14 +857,7 @@ void DolphinMainWindow::createFile() { // Use the same logic as in createDirectory() if (!m_newFileMenu->isCreateFileRunning()) { - QUrl targetDirectory = activeViewContainer()->view()->url(); - if (const auto itemOpt = activeViewContainer()->view()->firstSelectedItem()) { - if (itemOpt->isDir()) { - targetDirectory = itemOpt->url(); - } - } - - m_newFileMenu->setWorkingDirectory(targetDirectory); + m_newFileMenu->setWorkingDirectory(activeViewContainer()->url()); m_newFileMenu->createFile(); } } -- cgit v1.3