mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Better fix for 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@13173 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2006-02-09 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/register/ledger-core/split-register-control.c: Better fix
|
||||
for the code that updates the buy/sell action based on the number
|
||||
of shares entered in a transaction.
|
||||
|
||||
2006-02-08 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/register/ledger-core/split-register-control.c: Fix the code
|
||||
|
||||
@@ -968,12 +968,18 @@ gnc_split_register_traverse_check_stock_shares (SplitRegister *reg, const char *
|
||||
return;
|
||||
name = ((ComboCell *)cell)->cell.value;
|
||||
|
||||
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 (!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);
|
||||
if (buy) {
|
||||
if ((safe_strcmp (name, "") == 0) ||
|
||||
(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, "") == 0) ||
|
||||
(safe_strcmp (name, ACTION_BUY_STR) == 0)) {
|
||||
gnc_combo_cell_set_value((ComboCell *)cell, ACTION_SELL_STR);
|
||||
gnc_basic_cell_set_changed (cell, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user