correct text extent to not require active painter
This commit is contained in:
committed by
Vadim Zeitlin
parent
cc01fbc3c0
commit
988bc8b306
@@ -347,9 +347,11 @@ void wxQtDCImpl::DoGetTextExtent(const wxString& string,
|
|||||||
wxCoord *externalLeading,
|
wxCoord *externalLeading,
|
||||||
const wxFont *theFont ) const
|
const wxFont *theFont ) const
|
||||||
{
|
{
|
||||||
QFont f = m_qtPainter->font();
|
QFont f;
|
||||||
if (theFont != NULL)
|
if (theFont != NULL)
|
||||||
f = theFont->GetHandle();
|
f = theFont->GetHandle();
|
||||||
|
else
|
||||||
|
f = m_font.GetHandle();
|
||||||
|
|
||||||
QFontMetrics metrics(f);
|
QFontMetrics metrics(f);
|
||||||
if (x != NULL || y != NULL)
|
if (x != NULL || y != NULL)
|
||||||
|
Reference in New Issue
Block a user