From 26c55c32079817db011b3d5a63a618e0328e1340 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Thu, 29 Jan 1998 07:10:51 +0000 Subject: [PATCH] haha! fixed traversal, finally! git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@460 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/cellblock.h | 8 ++++++-- src/register/register.c | 2 +- src/register/table.c | 5 ++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/register/cellblock.h b/src/register/cellblock.h index 9d2501be4b..3a34daa3f1 100644 --- a/src/register/cellblock.h +++ b/src/register/cellblock.h @@ -18,10 +18,14 @@ * be traversed to will be the one indicated. Traversing * to the rright is usally performed with the tab key. * Special traversal order to the left, up or down are not - * currently implemented. To traverse out of the table entirely, + * currently implemented. + * + * To traverse out of the table entirely, * the next_row&col should be set to negative values. If * a traversal back into the table occurs, then the cell that - * will be entered will be the one with the negative values. + * will be entered will be the one with the negative values + * minus one. Thus to traverse out of the table, then back + * back to (m,n), set the next row-col to (-m-1,-n-1). * * MEMBERS: * The right_traverse array indicates which cell chould be diff --git a/src/register/register.c b/src/register/register.c index d9fc8c188f..97a9a733a0 100644 --- a/src/register/register.c +++ b/src/register/register.c @@ -166,7 +166,7 @@ void xaccInitBasicRegister (BasicRegister *reg) xaccNextRight (curs, CRED_CELL_R, CRED_CELL_C, DEBT_CELL_R, DEBT_CELL_C); xaccNextRight (curs, DEBT_CELL_R, DEBT_CELL_C, ACTN_CELL_R, ACTN_CELL_C); xaccNextRight (curs, ACTN_CELL_R, ACTN_CELL_C, MEMO_CELL_R, MEMO_CELL_C); - xaccNextRight (curs, MEMO_CELL_R, MEMO_CELL_C, -DATE_CELL_R, -DATE_CELL_C); + xaccNextRight (curs, MEMO_CELL_R, MEMO_CELL_C, -1-DATE_CELL_R, -1-DATE_CELL_C); /* -------------------------------- */ diff --git a/src/register/table.c b/src/register/table.c index c980a7a133..206dfab610 100644 --- a/src/register/table.c +++ b/src/register/table.c @@ -638,13 +638,12 @@ traverseCB (Widget mw, XtPointer cd, XtPointer cb) */ if ((0 > next_row) || (0 > next_col)) { /* reverse the sign of next_row, col to be positive. */ - cbs->next_row = row - rel_row - next_row; - cbs->next_column = col - rel_col - next_col; + cbs->next_row = row - rel_row - next_row -1; + cbs->next_column = col - rel_col - next_col -1; cbs->qparam = NULLQUARK; if (table->next_tab_group) { XmProcessTraversal (table->next_tab_group, XmTRAVERSE_CURRENT); - } } else { cbs->next_row = row - rel_row + next_row;