minor but important fix to the sort order.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1248 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-10-01 04:48:48 +00:00
parent 49ab81302d
commit 5aff12d808

View File

@ -209,6 +209,13 @@ xaccQuerySetDateRange (Query *q, time_t early, time_t late)
}
/* ================================================== */
/* Note that the sort order for a transaction that is
* currently being edited is based on its old values,
* not in its current edit values. This is somewhat
* arbitrary, but it does alleviate annoying behaviour
* in the GUI, behaviour that could not be easily
* rectified there.
*/
#define PROLOG \
char *da, *db; \
@ -222,6 +229,8 @@ xaccQuerySetDateRange (Query *q, time_t early, time_t late)
\
ta = (*sa)->parent; \
tb = (*sb)->parent; \
if (ta->orig) ta = ta->orig; \
if (tb->orig) tb = tb->orig; \
\
if ( (ta) && !(tb) ) return -1; \
if ( !(ta) && (tb) ) return +1; \