correct text extent to not require active painter

This commit is contained in:
Sean D'Epagnier
2016-08-26 16:42:16 -04:00
committed by Vadim Zeitlin
parent cc01fbc3c0
commit 988bc8b306

View File

@@ -347,9 +347,11 @@ void wxQtDCImpl::DoGetTextExtent(const wxString& string,
wxCoord *externalLeading,
const wxFont *theFont ) const
{
QFont f = m_qtPainter->font();
QFont f;
if (theFont != NULL)
f = theFont->GetHandle();
else
f = m_font.GetHandle();
QFontMetrics metrics(f);
if (x != NULL || y != NULL)