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:
parent
6f0c5f65b6
commit
974c75272c
@ -118,8 +118,12 @@ void wxControlBase::InitCommandEvent(wxCommandEvent& event) const
|
||||
|
||||
bool wxControlBase::SetFont(const wxFont& font)
|
||||
{
|
||||
if ( !wxWindow::SetFont(font) )
|
||||
return false;
|
||||
|
||||
InvalidateBestSize();
|
||||
return wxWindow::SetFont(font);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// wxControl-specific processing after processing the update event
|
||||
|
Loading…
Reference in New Issue
Block a user