2001-08-06 Dave Peticolas <dave@krondo.com>

* src/register/pricecell.c: fix bugs


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5072 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-08-06 21:15:48 +00:00
parent 18957d5333
commit f2ffc649bb
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,7 @@
2001-08-06 Dave Peticolas <dave@krondo.com>
* src/register/pricecell.c: fix bugs
* src/engine/sql/upgrade.h: fix warning
* src/engine/gnc-pricedb.[ch] (gnc_price_equal): new func

View File

@ -56,7 +56,6 @@ static void xaccInitPriceCell (PriceCell *cell);
static void PriceSetValue (BasicCell *bcell, const char *value);
static const char * xaccPriceCellPrintValue (PriceCell *cell);
/* ================================================ */
static gboolean
@ -126,7 +125,7 @@ PriceMV (BasicCell *_cell,
/* ================================================ */
static void
PriceParse (PriceCell *cell)
PriceParse (PriceCell *cell, gboolean update_value)
{
const char *newval;
char *oldval;
@ -149,6 +148,9 @@ PriceParse (PriceCell *cell)
else
cell->amount = gnc_numeric_zero ();
if (!update_value)
return;
newval = xaccPriceCellPrintValue (cell);
/* If they are identical do nothing */
@ -166,7 +168,7 @@ PriceLeave (BasicCell *_cell)
{
PriceCell *cell = (PriceCell *) _cell;
PriceParse (cell);
PriceParse (cell, TRUE);
}
/* ================================================ */
@ -246,7 +248,7 @@ xaccGetPriceCellValue (PriceCell *cell)
if (cell == NULL)
return gnc_numeric_zero ();
PriceParse (cell);
PriceParse (cell, FALSE);
return cell->amount;
}