From 5466c62fcfcd99671d5afc34c404731514c836d1 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Thu, 27 Nov 1997 00:15:41 +0000 Subject: [PATCH] eliminate an annoying flashing problem git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@154 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/RegWindow.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/RegWindow.c b/src/RegWindow.c index 9510d3ba9a..2e134e1561 100644 --- a/src/RegWindow.c +++ b/src/RegWindow.c @@ -296,6 +296,14 @@ regRefresh( RegWindow *regData ) String **newData; double themount; /* amount */ + /* unmap the pop boxes, otherwise they get confused about + * which row/transaction they belong to. The goal is to + * do this *before* rows are added to, or deleted from + * the XbaeMatrix. */ + SetPopBox (regData->actbox, -1, -1); + SetPopBox (regData->xfrmbox, -1, -1); + SetPopBox (regData->xtobox, -1, -1); + /* first, build a sorted array of transactions */ if (1 == regData->numAcc) { tarray = regData->blackacc[0]->transaction; @@ -1490,7 +1498,6 @@ regSaveTransaction( RegWindow *regData, int position ) } } - if( regData->changed & MOD_DATE ) { @@ -1560,12 +1567,6 @@ regSaveTransaction( RegWindow *regData, int position ) regData->currEntry = (newrow-NUM_HEADER_ROWS)/NUM_ROWS_PER_TRANS; } - /* unmap the pop boxes, otherwise they get confused about - * which row/transaction they belong to */ - SetPopBox (regData->actbox, -1, -1); - SetPopBox (regData->xfrmbox, -1, -1); - SetPopBox (regData->xtobox, -1, -1); - /* reset the "changed" bitfield */ regData->changed = 0; @@ -2496,11 +2497,6 @@ deleteCB( Widget mw, XtPointer cd, XtPointer cb ) Account * cred = (Account *) (trans->credit); Account * deb = (Account *) (trans->debit); - /* unmanage the ComboBoxes, otherwise things get confusing */ - SetPopBox (regData->actbox, -1, -1); - SetPopBox (regData->xfrmbox, -1, -1); - SetPopBox (regData->xtobox, -1, -1); - /* remove the transaction from both accounts */ REMOVE_TRANS (cred, trans); REMOVE_TRANS (deb, trans);