]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textmeasure.cpp
add support for alpha in color dialog on OSX, see #14127
[wxWidgets.git] / src / gtk / textmeasure.cpp
index 7320111f0e51a33644d8dee6a829a469a107e0c4..eafd06848d132d9c7aedea70543768f5a164ea94 100644 (file)
@@ -116,8 +116,11 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string,
 {
     if ( !m_context )
     {
-        *width =
-        *height = 0;
+        if ( width )
+            *width = 0;
+
+        if ( height )
+            *height = 0;
         return;
     }
 
@@ -162,8 +165,11 @@ void wxTextMeasure::DoGetTextExtent(const wxString& string,
 
 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 )