[gnome-commander] Fix for ghost selection using right mouse button



commit 2e99a6773daa89290d74d433d4769e13df0a8fd5
Author: phan <phanyx o2 pl>
Date:   Fri Jul 9 22:48:17 2010 +0200

    Fix for ghost selection using right mouse button
    
    While having right mouse button set for selecting files,
    callback function on_motion_notify() was causing ghost
    selecting files (i.e. coloring them, but not actually
    selecting them), that are above a row, that mouse is
    pointing. That was caused by passing not incremented
    row argument to select_file()/unselect_file() functions.

 src/gnome-cmd-file-list.cc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 700cb8e..4131a3c 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -1226,12 +1226,12 @@ static void on_motion_notify (GtkCList *clist, GdkEventMotion *event, GnomeCmdFi
 
         row = gnome_cmd_clist_get_row (*fl, event->x, y);
 
-        if (row != -1)
+        if (row++ != -1)
         {
-            GnomeCmdFile *f = fl->get_file_at_row(row+1);
+            GnomeCmdFile *f = fl->get_file_at_row(row);
             if (f)
             {
-                fl->select_row(row+1);
+                fl->select_row(row);
                 if (fl->priv->right_mb_sel_state)
                     fl->select_file(f, row);
                 else



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