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:
@@ -99,6 +99,18 @@ public:
|
||||
*/
|
||||
bool IsEllipsized() const;
|
||||
|
||||
/**
|
||||
Change the label shown in the control.
|
||||
|
||||
Notice that since wxWidgets 3.1.1 this function is guaranteed not to do
|
||||
anything if the label didn't really change, so there is no benefit to
|
||||
checking if the new label is different from the current one in the
|
||||
application code.
|
||||
|
||||
@see wxControl::SetLabel()
|
||||
*/
|
||||
virtual void SetLabel(const wxString& label);
|
||||
|
||||
/**
|
||||
This functions wraps the controls label so that each of its lines becomes at
|
||||
most @a width pixels wide if possible (the lines are broken at words
|
||||
|
Reference in New Issue
Block a user