Don't refresh wxStaticText if its label didn't really change

Optimize calling SetLabel() with the same label as the current one, this
seems to happen quite often in practice and results in flicker, so check
for it explicitly.
This commit is contained in:
Vadim Zeitlin
2017-07-16 02:29:49 +02:00
parent 4e2684c155
commit dfd03f5fee
6 changed files with 28 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ bool wxStaticText::Create( wxWindow *parent,
void wxStaticText::SetLabel(const wxString& label)
{
if ( label == m_labelOrig )
return;
m_labelOrig = label;
// middle/end ellipsization is handled by the OS: