[nautilus/wip/antoniof/new-list-view: 79/85] view-icon-controller: Don't select twice on click




commit 8cff05efbdac23bd5b6b01dd1afdeeed24c53023
Author: António Fernandes <antoniof gnome org>
Date:   Thu Feb 10 12:57:24 2022 +0000

    view-icon-controller: Don't select twice on click
    
    The end result is the same, but we are emitting the selection-changes
    signal uselessely a second time.

 src/nautilus-view-icon-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index e3a0f7ba7..cc946dcf2 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -812,7 +812,7 @@ on_click_pressed (GtkGestureClick *gesture,
          * followed by a secondary click to open the menu.
          * When holding Ctrl and Shift, GtkGridView does a good job, let's not
          * interfere in that case. */
-        if (!selection_mode)
+        if (!selection_mode && button != GDK_BUTTON_PRIMARY)
         {
             GtkSelectionModel *selection_model = GTK_SELECTION_MODEL (self->model);
             NautilusViewItemModel *item_model;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]