From: <vo...@us...> - 2013-06-24 08:42:10
|
Revision: 4155 http://sourceforge.net/p/moneymanagerex/code/4155 Author: vomikan Date: 2013-06-24 08:42:04 +0000 (Mon, 24 Jun 2013) Log Message: ----------- Currency pointer update Modified Paths: -------------- trunk/src/mmaccount.cpp trunk/src/mmcheckingpanel.cpp trunk/src/mmex.cpp trunk/src/mmtransaction.cpp Modified: trunk/src/mmaccount.cpp =================================================================== --- trunk/src/mmaccount.cpp 2013-06-23 14:05:25 UTC (rev 4154) +++ trunk/src/mmaccount.cpp 2013-06-24 08:42:04 UTC (rev 4155) @@ -69,17 +69,15 @@ mmAccount* mmAccountList::GetAccountSharedPtr(int accountID) const { - account_v::value_type res; - for (const auto& r : accounts_) { if (r->id_ == accountID) { - res = r; - break; + return r; } } - + wxASSERT(false); + account_v::value_type res = 0; return res; } Modified: trunk/src/mmcheckingpanel.cpp =================================================================== --- trunk/src/mmcheckingpanel.cpp 2013-06-23 14:05:25 UTC (rev 4154) +++ trunk/src/mmcheckingpanel.cpp 2013-06-24 08:42:04 UTC (rev 4155) @@ -274,6 +274,7 @@ when the checking panel is destroyed. */ transFilterActive_ = false; transFilterDlg_ = new mmFilterTransactionsDialog(core_, this); + core_->accountList_.getCurrencySharedPtr(m_AccountID)->loadCurrencySettings(); initViewTransactionsHeader(); initFilterSettings(); @@ -1420,7 +1421,6 @@ mmBankTransaction* pCopiedTrans = m_cp->core_->bTransactionList_.copyTransaction(m_selectedForCopy, m_cp->m_AccountID, useOriginalDate); - mmCurrency* pCurrencyPtr = m_cp->core_->accountList_.getCurrencySharedPtr(m_cp->m_AccountID); int transID = pCopiedTrans->transactionID(); topItemIndex_ = m_selectedIndex; refreshVisualList(transID); Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-06-23 14:05:25 UTC (rev 4154) +++ trunk/src/mmex.cpp 2013-06-24 08:42:04 UTC (rev 4155) @@ -3185,8 +3185,7 @@ if (tran->splitEntries_->numEntries() > 0) { tran->reportCategAmount_ = tran->getAmountForSplit(categID, subcategID); - - mmCurrency* pCurrencyPtr = m_core.get()->accountList_.getCurrencySharedPtr(tran->accountID_); + m_core.get()->accountList_.getCurrencySharedPtr(tran->accountID_)->loadCurrencySettings(); tran->reportCategAmountStr_ = CurrencyFormatter::float2String(tran->reportCategAmount_); } else Modified: trunk/src/mmtransaction.cpp =================================================================== --- trunk/src/mmtransaction.cpp 2013-06-23 14:05:25 UTC (rev 4154) +++ trunk/src/mmtransaction.cpp 2013-06-24 08:42:04 UTC (rev 4155) @@ -140,7 +140,7 @@ subcategID_ = q1.GetInt("SUBCATEGID"); fullCatStr_ = core->categoryList_.GetFullCategoryString(categID_, subcategID_); - mmCurrency* pCurrencyPtr = core->accountList_.getCurrencySharedPtr(accountID_); + core->accountList_.getCurrencySharedPtr(accountID_)->loadCurrencySettings(); splitEntries_ = new mmSplitTransactionEntries(); getSplitTransactions(splitEntries_); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |