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; virtual wxSize DoGetBestSize() const wxOVERRIDE;
private: private:
bool m_hasExplicitFont;
void OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) void OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
{ {
InitVisualAttributes(); InitVisualAttributes();

View File

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