Fix the code that updates the buy/sell action based on the number of

shares entered in a transaction.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13166 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-02-09 05:03:29 +00:00
parent 1b418bfeec
commit 7bb17ee723
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2006-02-08 David Hampton <hampton@employees.org>
* src/register/ledger-core/split-register-control.c: Fix the code
that updates the buy/sell action based on the number of shares
entered in a transaction.
* src/gnome/dialog-price-edit-db.c:
* src/engine/gnc-pricedb.c: A couple of performance enhancements.

View File

@ -968,10 +968,10 @@ gnc_split_register_traverse_check_stock_shares (SplitRegister *reg, const char *
return;
name = ((ComboCell *)cell)->cell.value;
if (buy && (safe_strcmp (name, ACTION_BUY_STR) != 0)) {
if (buy && (safe_strcmp (name, ACTION_SELL_STR) == 0)) {
gnc_combo_cell_set_value((ComboCell *)cell, ACTION_BUY_STR);
gnc_basic_cell_set_changed (cell, TRUE);
} else if (safe_strcmp (name, ACTION_SELL_STR) != 0) {
} else if (!buy && safe_strcmp (name, ACTION_BUY_STR) == 0) {
gnc_combo_cell_set_value((ComboCell *)cell, ACTION_SELL_STR);
gnc_basic_cell_set_changed (cell, TRUE);
}