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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user