From: Václav Slavík Date: Sun, 9 May 2010 10:27:35 +0000 (+0000) Subject: Fixed popup menu's title to be bold regardless of method used. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/163e127d2e98699e81168d8fda4602fa3bbd6f31 Fixed popup menu's title to be bold regardless of method used. Popup menus with title set via SetTitle() had bold font, but menus created by passing title as ctor argument used normal font. Fixed this by using the same code (SetTitle) in both cases, instead of having two independent (and out of sync) implementations of the same functionality. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 9df0797d69..155372dbc1 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -281,8 +281,9 @@ void wxMenu::Init() // if we have a title, insert it in the beginning of the menu if ( !m_title.empty() ) { - Append(idMenuTitle, m_title); - AppendSeparator(); + const wxString title = m_title; + m_title.clear(); // so that SetTitle() knows there was no title before + SetTitle(title); } }