From cea664e396fedc6458842bafe1ad296733dd8d8a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Feb 2018 21:13:31 +0100 Subject: [PATCH] Don't emit changed in unset if unneeded --- qutebrowser/config/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 232c5d4c8..b29106a95 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -402,8 +402,9 @@ class Config(QObject): def unset(self, name, *, save_yaml=False, pattern=None): """Set the given setting back to its default.""" self.get_opt(name) # To check whether it exists - self._values[name].remove(pattern) - self.changed.emit(name) + changed = self._values[name].remove(pattern) + if changed: + self.changed.emit(name) if save_yaml: self._yaml.unset(name, pattern=pattern)