Don't invalidate best size unnecessarily in wxControl::SetFont()
There is no reason to do it if the font didn't change at all.
This commit is contained in:
@@ -118,8 +118,12 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
|
|||||||
|
|
||||||
bool wxControlBase::SetFont(const wxFont& font)
|
bool wxControlBase::SetFont(const wxFont& font)
|
||||||
{
|
{
|
||||||
|
if ( !wxWindow::SetFont(font) )
|
||||||
|
return false;
|
||||||
|
|
||||||
InvalidateBestSize();
|
InvalidateBestSize();
|
||||||
return wxWindow::SetFont(font);
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// wxControl-specific processing after processing the update event
|
// wxControl-specific processing after processing the update event
|
||||||
|
Reference in New Issue
Block a user