┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp2
-rw-r--r--src/panels/terminal/terminalpanel.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 19f790662..ad193b051 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -751,7 +751,7 @@ void DolphinMainWindow::togglePanelLockState()
void DolphinMainWindow::slotTerminalPanelVisibilityChanged()
{
- if (m_terminalPanel->isHiddenInVisibleWindow()) {
+ if (m_terminalPanel->isHiddenInVisibleWindow() && m_activeViewContainer) {
m_activeViewContainer->view()->setFocus();
}
}
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index 52d2a77df..86974d200 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -82,16 +82,14 @@ void TerminalPanel::terminalExited()
bool TerminalPanel::isHiddenInVisibleWindow() const
{
return parentWidget()
- && parentWidget()->isHidden()
- && m_terminal
- && !hasProgramRunning();
+ && parentWidget()->isHidden();
}
void TerminalPanel::dockVisibilityChanged()
{
// Only react when the DockWidget itself (not some parent) is hidden. This way we don't
// respond when e.g. Dolphin is minimized.
- if (isHiddenInVisibleWindow()) {
+ if (isHiddenInVisibleWindow() && m_terminal && !hasProgramRunning()) {
// Make sure that the following "cd /" command will not affect the view.
disconnect(m_konsolePart, SIGNAL(currentDirectoryChanged(QString)),
this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString)));