X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-editor.c;fp=src%2Fui%2Fgui%2Fpsppire-data-editor.c;h=212259f8c8b491983df970f99a712bc4345a8b12;hb=7b4aa24d8527b6d69d781148e0995658a96120b9;hp=7c3fca685eaa5e7d295455c4773584b649861ffd;hpb=eccddce2d2e67e7ddcdbd93d969ef4c5b6efdb28;p=pspp-builds.git diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 7c3fca68..212259f8 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -1331,10 +1331,14 @@ psppire_data_editor_insert_case (PsppireDataEditor *de) { glong posn = -1; - if ( de->data_sheet[0]->state == PSPPIRE_SHEET_ROW_SELECTED ) - posn = PSPPIRE_SHEET (de->data_sheet[0])->range.row0; + if ( PSPPIRE_SHEET (de->data_sheet[0])->select_status == PSPPIRE_SHEET_ROW_SELECTED ) + { + posn = PSPPIRE_SHEET (de->data_sheet[0])->range.row0; + } else - posn = PSPPIRE_SHEET (de->data_sheet[0])->active_cell.row; + { + posn = PSPPIRE_SHEET (de->data_sheet[0])->active_cell.row; + } if ( posn == -1 ) posn = 0;