attempt to keep the number of control updates lower during idle times

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-10-17 20:30:44 +00:00
parent 5364b91a46
commit 728d6d7d3a

View File

@@ -1757,10 +1757,16 @@ void wxWindowBase::UpdateWindowUI()
#if wxUSE_TEXTCTRL
wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
if ( text )
text->SetValue(event.GetText());
{
if ( event.GetText() != text->GetValue() )
text->SetValue(event.GetText());
}
else
#endif // wxUSE_TEXTCTRL
control->SetLabel(event.GetText());
{
if ( event.GetText() != control->GetLabel() )
control->SetLabel(event.GetText());
}
}
}