[seahorse] common/item-list: Avoid 2 items-changed on refilter
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] common/item-list: Avoid 2 items-changed on refilter
- Date: Mon, 22 Feb 2021 17:58:37 +0000 (UTC)
commit 8091d914f4d2a255d0e64960570f85e9a49fac7f
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Feb 22 18:57:31 2021 +0100
common/item-list: Avoid 2 items-changed on refilter
common/item-list.vala | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/common/item-list.vala b/common/item-list.vala
index 0036a6b0..c01a803b 100644
--- a/common/item-list.vala
+++ b/common/item-list.vala
@@ -200,7 +200,6 @@ public class Seahorse.ItemList : GLib.Object, GLib.ListModel {
// First remove all items
var len = this.items.length;
this.items.remove_range(0, len);
- items_changed(0, len, 0);
// Add only the ones that match the filter
foreach (var obj in this.base_collection.get_objects()) {
@@ -212,7 +211,7 @@ public class Seahorse.ItemList : GLib.Object, GLib.ListModel {
this.items.sort(compare_items);
// Notify listeners
- items_changed(0, 0, this.items.length);
+ items_changed(0, len, this.items.length);
debug("%u/%u elements visible after refilter on '%s'",
this.items.length, this.base_collection.get_length(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]