From 1536c74a81c33048ca556e7c77fe7efb373930ff Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Sat, 30 Aug 2014 04:15:31 -0700 Subject: [PATCH] MGR: Fix bug in initial layout of Simple View project panel. --- clientgui/sg_ProjectPanel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/clientgui/sg_ProjectPanel.cpp b/clientgui/sg_ProjectPanel.cpp index 51b3cb0995..bc20f9ba5f 100644 --- a/clientgui/sg_ProjectPanel.cpp +++ b/clientgui/sg_ProjectPanel.cpp @@ -153,9 +153,18 @@ CSimpleProjectPanel::CSimpleProjectPanel( wxWindow* parent ) : bSizer1->AddSpacer(ADJUSTFORYDPI(10)); + // Temporarily insert a dummy entry so sizer can + // get correct height of m_ProjectSelectionCtrl + CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); + wxBitmap* defaultBM = pSkinSimple->GetProjectImage()->GetBitmap(); + m_ProjectSelectionCtrl->Insert("", *defaultBM, 0, (void*)NULL); + this->SetSizer( bSizer1 ); this->Layout(); + // Remove the dummy entry + m_ProjectSelectionCtrl->Delete(0); + m_TaskAddProjectButton->SetToolTip(wxEmptyString); m_TaskAddProjectButton->Disable(); }