From 7cbf19f3df47af812c0022e7c760cb7c71ef8f90 Mon Sep 17 00:00:00 2001 From: vomikan Date: Sun, 2 Nov 2014 19:36:17 +0300 Subject: [PATCH] bugfix [bugs:#536] --- src/assetspanel.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/assetspanel.cpp b/src/assetspanel.cpp index dc0450a4e9..aca1825d78 100644 --- a/src/assetspanel.cpp +++ b/src/assetspanel.cpp @@ -348,7 +348,8 @@ bool mmAssetsPanel::Create(wxWindow *parent m_listCtrlAssets->EnsureVisible(this->m_assets.size() - 1); this->windowsFreezeThaw(); - + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); return true; } @@ -617,10 +618,10 @@ void mmAssetsPanel::updateExtraAssetData(int selIndex) { const Model_Asset::Data& asset = this->m_assets[selIndex]; enableEditDeleteButtons(true); - wxString miniInfo = "\t"; - miniInfo += wxString::Format(_("Change in Value: %s %s") - , wxGetTranslation(asset.VALUECHANGE) - , (Model_Asset::rate(asset) != Model_Asset::RATE_NONE) ? wxString::Format("= %.2f %", asset.VALUECHANGERATE) : ""); + const auto& change_rate = (Model_Asset::rate(asset) != Model_Asset::RATE_NONE) + ? wxString::Format("%.2f %%", asset.VALUECHANGERATE) : ""; + const wxString& miniInfo = " " + wxString::Format(_("Change in Value: %s %s") + , wxGetTranslation(asset.VALUECHANGE), change_rate); st->SetLabelText(asset.NOTES); stm->SetLabelText(miniInfo);