]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textmeasurecmn.cpp
skip apple options
[wxWidgets.git] / src / common / textmeasurecmn.cpp
index 6381059dd8799cfa59485a9a5c2fe9d16d77dd7a..8d828d4b714a77cdd76673f5278f8135fecc6e77 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxTextMeasureBase implementation
 // Author:      Manuel Martin
 // Created:     2012-10-05
-// RCS-ID:      $Id:
 // Copyright:   (c) 1997-2012 wxWidgets team
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -86,7 +85,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;