From 491cd3744c11da45ac6e41c734e4a33c19b060c9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 31 Aug 2014 17:57:29 -0700 Subject: [PATCH] psppire-dialog-action-var-info: Only allow "Jump To" with one variable. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Until now, when at least one variable was selected, the user could click on "Jump To", which would jump to the first selected variable. This commit changes behavior so that "Jump To" is only enabled when exactly one variable is selected, which makes it a lot less confusing about which variable will be jumped to. Suggested by Bastián Díaz . --- src/ui/gui/psppire-dialog-action-var-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-dialog-action-var-info.c b/src/ui/gui/psppire-dialog-action-var-info.c index a638be441f..d6b974f687 100644 --- a/src/ui/gui/psppire-dialog-action-var-info.c +++ b/src/ui/gui/psppire-dialog-action-var-info.c @@ -52,7 +52,7 @@ treeview_item_selected (gpointer data) GtkTreeView *tv = GTK_TREE_VIEW (pda->source); GtkTreeSelection *selection = gtk_tree_view_get_selection (tv); - return gtk_tree_selection_count_selected_rows (selection) > 0; + return gtk_tree_selection_count_selected_rows (selection) == 1; } static gchar * -- 2.30.2