Commit f8d8c3aa authored by Mariusz Glebocki's avatar Mariusz Glebocki Committed by Kurt Hindenburg
Browse files

Disable activity/silence signal only when both options are off

Activity and silence monitoring use common signal.
parent 9e52df8d
......@@ -398,8 +398,10 @@ void Part::setMonitorSilenceEnabled(bool enabled)
Qt::UniqueConnection);
} else {
activeSession()->setMonitorSilence(false);
disconnect(activeSession(), &Konsole::Session::notificationsChanged,
this, &Konsole::Part::notificationChanged);
if (!activeSession()->isMonitorActivity()) {
disconnect(activeSession(), &Konsole::Session::notificationsChanged,
this, &Konsole::Part::notificationChanged);
}
}
}
......@@ -414,9 +416,11 @@ void Part::setMonitorActivityEnabled(bool enabled)
Qt::UniqueConnection);
} else {
activeSession()->setMonitorActivity(false);
disconnect(activeSession(), &Konsole::Session::notificationsChanged,
this,
&Konsole::Part::notificationChanged);
if (!activeSession()->isMonitorSilence()) {
disconnect(activeSession(), &Konsole::Session::notificationsChanged,
this,
&Konsole::Part::notificationChanged);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment