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:
@@ -144,6 +144,9 @@ void wxStaticText::GTKDoSetLabel(GTKLabelSetter setter, const wxString& label)
|
||||
|
||||
void wxStaticText::SetLabel(const wxString& label)
|
||||
{
|
||||
if ( label == m_labelOrig )
|
||||
return;
|
||||
|
||||
m_labelOrig = label;
|
||||
|
||||
GTKDoSetLabel(&wxStaticText::GTKSetLabelForLabel, label);
|
||||
|
Reference in New Issue
Block a user