Commit 7e571612 authored by Alexandru Băluț's avatar Alexandru Băluț

utils: Emit selected-changed only when it changes

It's more efficient this way, and it might fix #2087
parent 3adcd9d4
......@@ -66,8 +66,10 @@ class Selected(GObject.Object):
def selected(self, selected):
differs = self._selected != selected
self._selected = selected
self.emit("selected-changed", selected)
if differs:
self.emit("selected-changed", selected)
class Selection(GObject.Object, Loggable):
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