From: <gua...@us...> - 2012-05-13 02:39:55
|
Revision: 2323 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2323&view=rev Author: guanlisheng Date: 2012-05-13 02:39:49 +0000 (Sun, 13 May 2012) Log Message: ----------- revert clientdata usage Modified Paths: -------------- trunk/mmex/src/stockdialog.cpp Modified: trunk/mmex/src/stockdialog.cpp =================================================================== --- trunk/mmex/src/stockdialog.cpp 2012-05-13 01:25:51 UTC (rev 2322) +++ trunk/mmex/src/stockdialog.cpp 2012-05-13 02:39:49 UTC (rev 2323) @@ -247,24 +247,19 @@ DB_View_ACCOUNTLIST_V1::Data_Set all_accounts = ACCOUNTLIST_V1.find(db_, DB_View_ACCOUNTLIST_V1::COL_ACCOUNTTYPE, wxT("Investment")); wxArrayString account_names; - int* account_ids = new int[all_accounts.size()]; BOOST_FOREACH(const DB_View_ACCOUNTLIST_V1::Data &account, all_accounts) { - account_ids[account_names.size()] = account.id(); account_names.Add(account.ACCOUNTNAME); } - wxSingleChoiceDialog scd(0, _("Choose Investment Account"), _("Select Account"), account_names, (char**)account_ids); + wxSingleChoiceDialog scd(0, _("Choose Investment Account"), _("Select Account"), account_names); if (scd.ShowModal() == wxID_OK) { wxString acctName = scd.GetStringSelection(); - //accountID_ = core_->getAccountID(acctName); - accountID_ = int(scd.GetSelectionClientData()); + accountID_ = core_->getAccountID(acctName); heldAt_->SetLabel(acctName); } - - delete []account_ids; } void mmStockDialog::OnCancel(wxCommandEvent& /*event*/) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |