From 6d315840a8e98ab7dbe28a76f23c734d09c33bc5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Feb 2009 02:39:54 -0400 Subject: Don't propagate display flags from cost amounts --- src/amount.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/amount.cc b/src/amount.cc index d7cdbacb..82d9b41b 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -933,15 +933,15 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) // Set the commodity's flags and precision accordingly - if (commodity_ && (newly_created || ! flags.has_flags(PARSE_NO_MIGRATE))) { + if (flags.has_flags(PARSE_NO_MIGRATE)) { + set_keep_precision(true); + } + else if (commodity_) { commodity().add_flags(comm_flags); if (quantity->prec > commodity().precision()) commodity().set_precision(quantity->prec); } - else if (flags.has_flags(PARSE_NO_MIGRATE)) { - set_keep_precision(true); - } // Now we have the final number. Remove commas and periods, if // necessary. -- cgit v1.2.3