[Gnucash-changes] r13166 - gnucash/trunk - Fix the code that
updates the buy/sell action based on the number of
David Hampton
hampton at cvs.gnucash.org
Thu Feb 9 00:03:29 EST 2006
Author: hampton
Date: 2006-02-09 00:03:29 -0500 (Thu, 09 Feb 2006)
New Revision: 13166
Trac: http://svn.gnucash.org/trac/changeset/13166
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/register/ledger-core/split-register-control.c
Log:
Fix the code that updates the buy/sell action based on the number of
shares entered in a transaction.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-02-09 04:53:43 UTC (rev 13165)
+++ gnucash/trunk/ChangeLog 2006-02-09 05:03:29 UTC (rev 13166)
@@ -1,5 +1,9 @@
2006-02-08 David Hampton <hampton at 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.
Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c 2006-02-09 04:53:43 UTC (rev 13165)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c 2006-02-09 05:03:29 UTC (rev 13166)
@@ -968,10 +968,10 @@
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);
}
More information about the gnucash-changes
mailing list