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




commit 7dd449354818eb18ae5ecf6864d0961a522fcf58
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 2d5ff7746..46f95ddcd 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]