Moved flicker-removal to GTK+ code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -775,6 +775,14 @@ wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
|
||||
|
||||
void wxMenuItem::SetText( const wxString& str )
|
||||
{
|
||||
// Some optimization to avoid flicker
|
||||
wxString oldLabel = m_text;
|
||||
oldLabel = wxStripMenuCodes(oldLabel.BeforeFirst('\t'));
|
||||
oldLabel.Replace(wxT("_"), wxT(""));
|
||||
wxString label1 = wxStripMenuCodes(str.BeforeFirst('\t'));
|
||||
if (oldLabel == label1)
|
||||
return;
|
||||
|
||||
DoSetText(str);
|
||||
|
||||
if (m_menuItem)
|
||||
|
Reference in New Issue
Block a user