diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-04 03:11:14 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-04 03:11:14 -0400 |
commit | 7f7243ff9360f1c44f9e7b16a0e93244645aa031 (patch) | |
tree | b3a9b9257da948ff72bedb1c6e95703cc647a8f2 /src/commodity.h | |
parent | 2ae2dc86c6bf88f512f905ff3b9ed9c170baf536 (diff) | |
download | fork-ledger-7f7243ff9360f1c44f9e7b16a0e93244645aa031.tar.gz fork-ledger-7f7243ff9360f1c44f9e7b16a0e93244645aa031.tar.bz2 fork-ledger-7f7243ff9360f1c44f9e7b16a0e93244645aa031.zip |
Made the behavior of -V a bit more rational
It now only values non-primary commodities in terms of primary ones.
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commodity.h b/src/commodity.h index 05dc3395..483d98b0 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -351,7 +351,8 @@ public: , const int indent = 0 #endif ) const { - if (base->varied_history && ! has_flags(COMMODITY_WALKED)) { + if (! has_flags(COMMODITY_WALKED) && base->varied_history && + (commodity || ! has_flags(COMMODITY_PRIMARY))) { const_cast<commodity_t&>(*this).add_flags(COMMODITY_WALKED); optional<price_point_t> point = base->varied_history->find_price(*this, commodity, moment, oldest |