From: Ben Pfaff Date: Sun, 14 Oct 2012 18:36:13 +0000 (-0700) Subject: pspp-sheet-view-column: Make clicking on a row head column select all data. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61ced2b613dcffbe81a65002f023ec468cf6b89e;p=pspp pspp-sheet-view-column: Make clicking on a row head column select all data. This is what users typically expect: clicking on the upper-left of a spreadsheet selects all of the cells in the spreadsheet. --- diff --git a/src/ui/gui/pspp-sheet-view-column.c b/src/ui/gui/pspp-sheet-view-column.c index f51fcff1a9..c586a4bdae 100644 --- a/src/ui/gui/pspp-sheet-view-column.c +++ b/src/ui/gui/pspp-sheet-view-column.c @@ -1366,8 +1366,13 @@ on_pspp_sheet_view_column_button_clicked (PsppSheetViewColumn *column) if (pspp_sheet_selection_get_mode (selection) == PSPP_SHEET_SELECTION_RECTANGLE) { pspp_sheet_selection_select_all (selection); - pspp_sheet_selection_unselect_all_columns (selection); - pspp_sheet_selection_select_column (selection, column); + if (pspp_sheet_view_column_get_row_head (column)) + pspp_sheet_selection_select_all_columns (selection); + else + { + pspp_sheet_selection_unselect_all_columns (selection); + pspp_sheet_selection_select_column (selection, column); + } sheet_view->priv->anchor_column = column; return TRUE; }