From eab495c496c2ed4983ac328cd864fc9097752fd9 Mon Sep 17 00:00:00 2001 From: Mariano Reingart Date: Mon, 19 Jan 2015 02:39:52 +0000 Subject: [PATCH] wxQt: fix performance issue with font comparisons Thanks @seandepagnier git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fontcmn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 4f0a4a6014..b0e175ca56 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -389,7 +389,8 @@ bool wxFontBase::operator==(const wxFont& font) const // in wxGTK1 GetPixelSize() calls GetInternalFont() which uses // operator==() resulting in infinite recursion so we can't use it // in that port -#if !defined(__WXGTK__) || defined(__WXGTK20__) + // in wxQT, GetPixelSize is too slow to be used here +#if (!defined(__WXGTK__) || defined(__WXGTK20__)) && !defined(__WXQT__) GetPixelSize() == font.GetPixelSize() && #endif GetFamily() == font.GetFamily() &&