From 435d8187c1faeb105aa0af9c0a03ade39c45d9a3 Mon Sep 17 00:00:00 2001 From: Andreas Buchen Date: Wed, 13 Jan 2016 22:20:25 +0100 Subject: [PATCH] Fixed incomplete display of conversion exchange rate label --- .../portfolio/ui/dialogs/transactions/BuySellModel.java | 9 +++++++-- .../ui/dialogs/transactions/SecurityDeliveryModel.java | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/BuySellModel.java b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/BuySellModel.java index 167da697ea..7c9dde3987 100644 --- a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/BuySellModel.java +++ b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/BuySellModel.java @@ -58,8 +58,8 @@ public void applyChanges() if (source != null) { @SuppressWarnings("unchecked") - TransactionOwner owner = (TransactionOwner) source.getOwner(source - .getPortfolioTransaction()); + TransactionOwner owner = (TransactionOwner) source + .getOwner(source.getPortfolioTransaction()); owner.deleteTransaction(source.getPortfolioTransaction(), client); source = null; } @@ -101,10 +101,15 @@ public void setAccount(Account account) { String oldAccountCurrency = getTransactionCurrencyCode(); String oldExchangeRateCurrencies = getExchangeRateCurrencies(); + String oldInverseExchangeRateCurrencies = getInverseExchangeRateCurrencies(); + firePropertyChange(Properties.account.name(), this.account, this.account = account); + firePropertyChange(Properties.transactionCurrencyCode.name(), oldAccountCurrency, getTransactionCurrencyCode()); firePropertyChange(Properties.exchangeRateCurrencies.name(), oldExchangeRateCurrencies, getExchangeRateCurrencies()); + firePropertyChange(Properties.inverseExchangeRateCurrencies.name(), oldInverseExchangeRateCurrencies, + getInverseExchangeRateCurrencies()); if (getSecurity() != null) { diff --git a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/SecurityDeliveryModel.java b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/SecurityDeliveryModel.java index 27dd3d1aae..e47db0e25f 100644 --- a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/SecurityDeliveryModel.java +++ b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/dialogs/transactions/SecurityDeliveryModel.java @@ -110,9 +110,14 @@ public void setTransactionCurrency(CurrencyUnit currency) { String oldCurrencyCode = getTransactionCurrencyCode(); String oldExchangeRateCurrencies = getExchangeRateCurrencies(); + String oldInverseExchangeRateCurrencies = getInverseExchangeRateCurrencies(); + firePropertyChange(Properties.transactionCurrency.name(), transactionCurrency, transactionCurrency = currency); + firePropertyChange(Properties.transactionCurrencyCode.name(), oldCurrencyCode, getTransactionCurrencyCode()); firePropertyChange(Properties.exchangeRateCurrencies.name(), oldExchangeRateCurrencies, getExchangeRateCurrencies()); + firePropertyChange(Properties.inverseExchangeRateCurrencies.name(), oldInverseExchangeRateCurrencies, + getInverseExchangeRateCurrencies()); } }