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:
Julian Smart
2002-06-18 15:57:39 +00:00
parent 40c0880859
commit 5869f93fc8
3 changed files with 24 additions and 17 deletions

View File

@@ -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)