From 8535cde836e27465a4d4e4be993343b039dba4bd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Jul 2020 15:47:35 +0200 Subject: [PATCH] Remove apparently unnecessary m_hasExplicitFont Just use wxWindow::m_hasFont instead. --- include/wx/generic/treectlg.h | 2 -- src/generic/treectlg.cpp | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index af48e36853..2388eedc9c 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -352,8 +352,6 @@ protected: virtual wxSize DoGetBestSize() const wxOVERRIDE; private: - bool m_hasExplicitFont; - void OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event)) { InitVisualAttributes(); diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index befce9c8a9..ec53ebf4a0 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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));