]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textmeasurecmn.cpp
Disable wxUSE_ENH_METAFILE for wxGTK builds.
[wxWidgets.git] / src / common / textmeasurecmn.cpp
index 6381059dd8799cfa59485a9a5c2fe9d16d77dd7a..f583662cd14d27b418d385a88656a1ae1c69902e 100644 (file)
@@ -86,7 +86,9 @@ void wxTextMeasureBase::GetTextExtent(const wxString& string,
     if ( !height )
         height = &unusedHeight;
 
-    if ( string.empty() )
+    // Avoid even setting up the DC for measuring if we don't actually need to
+    // measure anything.
+    if ( string.empty() && !descent && !externalLeading )
     {
         *width =
         *height = 0;