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:
@@ -70,6 +70,9 @@ void wxStaticText::DoDraw(wxControlRenderer *renderer)
|
||||
|
||||
void wxStaticText::SetLabel(const wxString& str)
|
||||
{
|
||||
if ( label == m_labelOrig )
|
||||
return;
|
||||
|
||||
// save original label
|
||||
m_labelOrig = str;
|
||||
|
||||
|
Reference in New Issue
Block a user