┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorGeri Gelóczi <[email protected]>2026-03-05 10:14:40 +0100
committerAkseli Lahtinen <[email protected]>2026-03-05 11:14:40 +0200
commitde4502909053fbea3295409540a97a5c74ca6611 (patch)
tree2bd6b3dc82bd2c567ebd3ed15c42a9581537d6f7 /src/dolphinmainwindow.cpp
parent7f367dc5025bf27c7f3628dc793d53f4e2313a04 (diff)
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
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp18
1 files 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();
}
}