Remove apparently unnecessary m_hasExplicitFont

Just use wxWindow::m_hasFont instead.
This commit is contained in:
Vadim Zeitlin 2020-07-14 15:47:35 +02:00
parent 0d7ab26e7d
commit 8535cde836
2 changed files with 1 additions and 4 deletions

View File

@ -352,8 +352,6 @@ protected:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
private:
bool m_hasExplicitFont;
void OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
{
InitVisualAttributes();

View File

@ -982,7 +982,6 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
m_spacing = 10;
}
m_hasExplicitFont = m_hasFont;
InitVisualAttributes();
SetInitialSize(size);
@ -1011,7 +1010,7 @@ void wxGenericTreeCtrl::InitVisualAttributes()
const wxVisualAttributes attr(GetDefaultAttributes());
SetOwnForegroundColour(attr.colFg);
SetOwnBackgroundColour(attr.colBg);
if (!m_hasExplicitFont)
if (!m_hasFont)
SetOwnFont(attr.font);
m_hilightBrush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));