X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-editor.c;h=0efd8ce835186de958d58e28f704b1ff9c38e83d;hb=4ad4fcab6c886b1a6f29769a374b67b2f60173a9;hp=27a4b63ab30a0e8c81b88adb29edc2c1ed909b9e;hpb=f15768f0d46bae8b5e06d84558a0f2397d6fdfd7;p=pspp diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 27a4b63ab3..0efd8ce835 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -345,8 +345,23 @@ refresh_entry (PsppireDataEditor *de) } static void -on_datum_entry_activate (PsppireValueEntry *entry, PsppireDataEditor *de) +on_datum_entry_activate (GtkEntry *entry, PsppireDataEditor *de) { + gint row, col; + if (ssw_sheet_get_active_cell (SSW_SHEET (de->data_sheet), &col, &row)) + { + union value val; + const struct variable *var = psppire_dict_get_variable (de->dict, col); + if (var == NULL) + return; + + value_init (&val, var_get_width (var)); + + if (psppire_value_entry_get_value (de->datum_entry, &val, var_get_width (var))) + { + psppire_data_store_set_value (de->data_store, row, var, &val); + } + } }