From b62c12a425ab03fd37879e224e29ed53d167f8d4 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 27 Jul 2009 11:22:00 +0200 Subject: [PATCH] Redraw selection when reducing its area. This change ensures that the area of the selection is properly indicated when it's in the process of being decreasing its area as well as increasing it. --- lib/gtk-contrib/psppire-sheet.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index 46719927..7e36381e 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -3689,11 +3689,21 @@ psppire_sheet_motion (GtkWidget *widget, GdkEventMotion *event) if (PSPPIRE_SHEET_IN_SELECTION (sheet) ) { GdkRectangle area; + + /* Redraw the old range */ + rectangle_from_range (sheet, &sheet->range, &area); + area.x++; + area.y++; + gdk_window_invalidate_rect (sheet->sheet_window, &area, FALSE); + sheet->range.rowi = row; sheet->range.coli = column; sheet->select_status = PSPPIRE_SHEET_RANGE_SELECTED; + /* Redraw the new range */ rectangle_from_range (sheet, &sheet->range, &area); + area.x++; + area.y++; gdk_window_invalidate_rect (sheet->sheet_window, &area, FALSE); } else -- 2.30.2