From 728d6d7d3a56916286b83618dba59586792acf64 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 17 Oct 2002 20:30:44 +0000 Subject: [PATCH] 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 --- src/common/wincmn.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 205402dd18..4394783529 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -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()); + } } }