diff --git a/src/gnome-utils/dialog-transfer.c b/src/gnome-utils/dialog-transfer.c index f7d24f07e2..13c07dbbd9 100644 --- a/src/gnome-utils/dialog-transfer.c +++ b/src/gnome-utils/dialog-transfer.c @@ -2240,9 +2240,9 @@ gboolean gnc_xfer_dialog_run_exchange_dialog( if (xaccTransUseTradingAccounts (txn)) { /* If we're using commodity trading accounts then "amount" is - really the split's amount and it's in xfer_com. We need an - exchange rate that will convert this amount into a value in - the transaction currency. */ + really the split's amount and it's in xfer_com commodity. + We need an exchange rate that will convert this amount + into a value in the transaction currency. */ if (gnc_commodity_equal(xfer_com, txn_cur)) { /* Transaction is in the same currency as the split, exchange @@ -2251,15 +2251,15 @@ gboolean gnc_xfer_dialog_run_exchange_dialog( return FALSE; } swap_amounts = expanded; - - /* We know that "amount" is always in the reg_com currency. - * Unfortunately it is possible that neither xfer_com or txn_cur are - * the same as reg_com, in which case we need to convert to the txn - * currency... Or, if the register commodity is the xfer_com, then we - * need to flip-flop the commodities and the exchange rates. - */ - } + + /* We know that "amount" is always in the reg_com currency. + * Unfortunately it is possible that neither xfer_com or txn_cur are + * the same as reg_com, in which case we need to convert to the txn + * currency... Or, if the register commodity is the xfer_com, then we + * need to flip-flop the commodities and the exchange rates. + */ + else if (gnc_commodity_equal(reg_com, txn_cur)) { /* we're working in the txn currency. Great. Nothing to do! */ @@ -2311,6 +2311,8 @@ gboolean gnc_xfer_dialog_run_exchange_dialog( gnc_xfer_dialog_hide_from_account_tree(xfer); gnc_xfer_dialog_set_amount(xfer, amount); + /* Now that from amount is set, set the to amount. */ + gnc_xfer_update_to_amount(xfer); /* * When we flip, we should tell the dialog so it can deal with the