diff options
| author | Andrey Yashkin <[email protected]> | 2019-07-28 18:26:36 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-07-28 18:29:38 +0200 |
| commit | 8bed4c25ee42056174519b45b899dddfce24a0e9 (patch) | |
| tree | ba8765fb9dce9fa5bea36d2835e16695de4eb8b6 /src/panels | |
| parent | 2f5e83419b9585df13614c36387054bc41bcc551 (diff) | |
Fix dir change when show hidden terminal panel with running program in it
Summary: Terminal panel doesn't change its working directory, while any procces is running in it. However, if you hide it and show again the program will get a string with a //cd path// command.
Test Plan:
1. Open dolphin
2. Press F4
3. Start any process like gnu nano
4. Press F4 two more times
Reviewers: #dolphin
Subscribers: anthonyfieroni, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D22422
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 8dedd0be1..52d2a77df 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -177,7 +177,9 @@ void TerminalPanel::showEvent(QShowEvent* event) } if (m_terminal) { m_terminal->showShellInDir(url().toLocalFile()); - changeDir(url()); + if(!hasProgramRunning()) { + changeDir(url()); + } m_terminalWidget->setFocus(); connect(m_konsolePart, SIGNAL(currentDirectoryChanged(QString)), this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString))); |
