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:
@@ -71,6 +71,9 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
void wxStaticText::SetLabel(const wxString& label)
|
||||
{
|
||||
if ( label == m_labelOrig )
|
||||
return;
|
||||
|
||||
m_labelOrig = label; // save original label
|
||||
|
||||
// Motif does not support ellipsized labels natively
|
||||
|
Reference in New Issue
Block a user