X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Fui%2Fgui%2Fpsppire-data-editor.c;h=30098a7e50d905f439d3d68e9847fe72379862bf;hb=5080068;hp=c5a3cd3671cf183fdf3718d4ec8856747c477839;hpb=8761c0923f6c1676ac9bf730c94471e9ce952d4f;p=pspp diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index c5a3cd3671..30098a7e50 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -225,6 +225,13 @@ new_data_callback (PsppireDataStore *ds, gpointer data) psppire_axis_clear (de->vaxis[i]); psppire_axis_append_n (de->vaxis[i], n_cases, DEFAULT_ROW_HEIGHT); } + + /* All of the data (potentially) changed, so unselect any selected cell(s) in + the data sheets. If we don't do this, then the sheet remembers the value + that was in the selected cell and stores it back, wiping out whatever + value there is in the new data. Bug #30502. */ + for (i = 0; i < 4; i++) + psppire_sheet_unselect_range (PSPPIRE_SHEET (de->data_sheet[i])); } static void