Changeset View
Changeset View
Standalone View
Standalone View
src/panels/terminal/terminalpanel.cpp
Context not available. | |||||
82 | bool TerminalPanel::isHiddenInVisibleWindow() const | 82 | bool TerminalPanel::isHiddenInVisibleWindow() const | ||
---|---|---|---|---|---|
83 | { | 83 | { | ||
84 | return parentWidget() | 84 | return parentWidget() | ||
85 | && parentWidget()->isHidden() | 85 | && parentWidget()->isHidden(); | ||
86 | && m_terminal | | |||
87 | && !hasProgramRunning(); | | |||
88 | } | 86 | } | ||
89 | 87 | | |||
90 | void TerminalPanel::dockVisibilityChanged() | 88 | void TerminalPanel::dockVisibilityChanged() | ||
91 | { | 89 | { | ||
92 | // Only react when the DockWidget itself (not some parent) is hidden. This way we don't | 90 | // Only react when the DockWidget itself (not some parent) is hidden. This way we don't | ||
93 | // respond when e.g. Dolphin is minimized. | 91 | // respond when e.g. Dolphin is minimized. | ||
94 | if (isHiddenInVisibleWindow()) { | 92 | if (isHiddenInVisibleWindow() && m_terminal && !hasProgramRunning()) { | ||
95 | // Make sure that the following "cd /" command will not affect the view. | 93 | // Make sure that the following "cd /" command will not affect the view. | ||
96 | disconnect(m_konsolePart, SIGNAL(currentDirectoryChanged(QString)), | 94 | disconnect(m_konsolePart, SIGNAL(currentDirectoryChanged(QString)), | ||
97 | this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString))); | 95 | this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString))); | ||
Context not available. |