X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ffind-dialog.c;h=6c6526867618e2724342e758232ae7e1ee30a937;hb=8ed8830ba7c39569cb4bf8086223a77efbac8b3a;hp=123f7cf69b3148e4a846fc42a6646c4205a05f53;hpb=87be5e048294611f220c0730b97565407c4ad568;p=pspp diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 123f7cf69b..6c65268676 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2011, 2012, 2015 Free Software Foundation + Copyright (C) 2007, 2009, 2011, 2012, 2015, 2020 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,6 +40,7 @@ which match particular strings */ #include "ui/gui/psppire-data-window.h" #include "ui/gui/psppire-dialog.h" #include "ui/gui/psppire-selector.h" +#include #include "gl/xalloc.h" @@ -101,18 +102,18 @@ do_find (GObject *obj, const struct find_dialog *fd) { casenumber x = -1; gint column = -1; - glong row; - - - row = 10; + glong row = -1; find_value (fd, row, &x, &column); if ( x != -1) { + SswSheet *sheet = SSW_SHEET (fd->de->data_editor->data_sheet); gtk_notebook_set_current_page (GTK_NOTEBOOK (fd->de->data_editor), PSPPIRE_DATA_EDITOR_DATA_VIEW); + ssw_sheet_scroll_to (sheet, column, x); + ssw_sheet_set_active_cell (sheet, column, x, NULL); } }