From 6f2d330f1c2fff134afaffad4ceaf3f938ff7ff4 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Fri, 28 Nov 1997 08:55:18 +0000 Subject: [PATCH] scroll to right location when account is expanded git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@172 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/MainWindow.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/MainWindow.c b/src/MainWindow.c index 92088ced5d..a9c5cf67ad 100644 --- a/src/MainWindow.c +++ b/src/MainWindow.c @@ -300,6 +300,7 @@ expandListCB( Widget mw, XtPointer pClientData, XtPointer cb) { XmAnyCallbackStruct *info = (XmAnyCallbackStruct *) cb; Account *acc = (Account *)pClientData; + int i, nrows; /* a "fix" to avoid double invocation */ switch ( info->reason ) { @@ -330,8 +331,28 @@ expandListCB( Widget mw, XtPointer pClientData, XtPointer cb) NULL); } - /* finally, redraw the main window */ + /* redraw the main window */ refreshMainWindow (); + + /* find the selected account in the new window, + * and scroll to it. */ + XtVaGetValues( accountlist, XmNrows, &nrows, NULL ); + + for (i=0; i