From: John Darrington Date: Mon, 27 Jul 2009 10:51:36 +0000 (+0200) Subject: Avoid the need for an extra click when de-selecting a region X-Git-Tag: build37~30 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00396b2d6cb415f19cefda552e3edd571a71ac93;p=pspp-builds.git Avoid the need for an extra click when de-selecting a region --- diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index 7c6d57d9..c84d8989 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -2898,7 +2898,8 @@ psppire_sheet_button_press (GtkWidget *widget, GdkEventButton *event) sheet_signals[DOUBLE_CLICK_COLUMN], 0, column); } } - else if (event->window == sheet->row_title_window) + + if (event->window == sheet->row_title_window) { g_signal_emit (sheet, sheet_signals[BUTTON_EVENT_ROW], 0, @@ -2969,18 +2970,16 @@ psppire_sheet_button_press (GtkWidget *widget, GdkEventButton *event) NULL, NULL, event->time); gtk_grab_add (GTK_WIDGET (sheet)); - if (psppire_sheet_click_cell (sheet, row, column)) + if ( sheet->select_status == PSPPIRE_SHEET_NORMAL) { - if ( sheet->select_status == PSPPIRE_SHEET_NORMAL) - { - sheet->range.row0 = row; - sheet->range.col0 = column; - } - else - { - psppire_sheet_unselect_range (sheet); - } + sheet->range.row0 = row; + sheet->range.col0 = column; + } + else + { + psppire_sheet_unselect_range (sheet); } + psppire_sheet_click_cell (sheet, row, column); } if (event->window == sheet->column_title_window)