From: John Darrington Date: Mon, 27 Jul 2009 09:22:00 +0000 (+0200) Subject: Redraw selection when reducing its area. X-Git-Tag: build37~35 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b62c12a425ab03fd37879e224e29ed53d167f8d4;p=pspp-builds.git 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. --- 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