]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textmeasure.cpp
simplify code to return from the end of the function
[wxWidgets.git] / src / gtk / textmeasure.cpp
index 48bec42aa5cd017c0441b5639bd87d4ca662482e..eafd06848d132d9c7aedea70543768f5a164ea94 100644 (file)
@@ -165,8 +165,11 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string,
 
 bool wxTextMeasure::DoGetPartialTextExtents(const wxString& text,
                                             wxArrayInt& widths,
 
 bool wxTextMeasure::DoGetPartialTextExtents(const wxString& text,
                                             wxArrayInt& widths,
-                                            double WXUNUSED(scaleX))
+                                            double scaleX)
 {
 {
+    if ( !m_layout )
+        return wxTextMeasureBase::DoGetPartialTextExtents(text, widths, scaleX);
+
     // Set layout's text
     const wxCharBuffer dataUTF8 = wxGTK_CONV_FONT(text, GetFont());
     if ( !dataUTF8 )
     // Set layout's text
     const wxCharBuffer dataUTF8 = wxGTK_CONV_FONT(text, GetFont());
     if ( !dataUTF8 )