[nautilus/wip/corey/selection-performance: 23/26] view-model: Stop notifying of selection change twice on set_selection
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/corey/selection-performance: 23/26] view-model: Stop notifying of selection change twice on set_selection
- Date: Sat, 1 Oct 2022 15:46:59 +0000 (UTC)
commit d66f6d6c224dc7b24be5847536eb4e8dcaacece1
Author: Corey Berla <corey berla me>
Date: Sat Oct 1 08:08:58 2022 -0700
view-model: Stop notifying of selection change twice on set_selection
Every time we set a selection, ::selection-changed is emitted twice,
first from gtk_selection_model_set_selection() and then from
gtk_selection_model_selection_changed. Remove the second call.
src/nautilus-view-model.c | 9 ---------
1 file changed, 9 deletions(-)
---
diff --git a/src/nautilus-view-model.c b/src/nautilus-view-model.c
index 0ce806713..4898a3203 100644
--- a/src/nautilus-view-model.c
+++ b/src/nautilus-view-model.c
@@ -86,16 +86,7 @@ nautilus_view_model_set_selection (GtkSelectionModel *model,
gboolean res;
res = gtk_selection_model_set_selection (selection_model, selected, mask);
- if (res)
- {
- guint min = gtk_bitset_get_minimum (mask);
- guint max = gtk_bitset_get_maximum (mask);
- if (min <= max)
- {
- gtk_selection_model_selection_changed (selection_model, min, max - min + 1);
- }
- }
return res;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]