eliminate an annoying flashing problem

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@154 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1997-11-27 00:15:41 +00:00
parent c64738e5e1
commit 5466c62fcf

View File

@ -296,6 +296,14 @@ regRefresh( RegWindow *regData )
String **newData; String **newData;
double themount; /* amount */ 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 */ /* first, build a sorted array of transactions */
if (1 == regData->numAcc) { if (1 == regData->numAcc) {
tarray = regData->blackacc[0]->transaction; tarray = regData->blackacc[0]->transaction;
@ -1490,7 +1498,6 @@ regSaveTransaction( RegWindow *regData, int position )
} }
} }
if( regData->changed & MOD_DATE ) if( regData->changed & MOD_DATE )
{ {
@ -1560,12 +1567,6 @@ regSaveTransaction( RegWindow *regData, int position )
regData->currEntry = (newrow-NUM_HEADER_ROWS)/NUM_ROWS_PER_TRANS; 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 */ /* reset the "changed" bitfield */
regData->changed = 0; regData->changed = 0;
@ -2496,11 +2497,6 @@ deleteCB( Widget mw, XtPointer cd, XtPointer cb )
Account * cred = (Account *) (trans->credit); Account * cred = (Account *) (trans->credit);
Account * deb = (Account *) (trans->debit); 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 the transaction from both accounts */
REMOVE_TRANS (cred, trans); REMOVE_TRANS (cred, trans);
REMOVE_TRANS (deb, trans); REMOVE_TRANS (deb, trans);