]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridctrl.cpp
fixed wxXmlResource::Load's detection of filenames to be done as early as possible
[wxWidgets.git] / src / generic / gridctrl.cpp
index 8db47ed3cf08964d9ae57d8d15920eca12bdad85..3098fd5ad597c4a6e4f46c2c26108290a694879a 100644 (file)
@@ -280,9 +280,19 @@ wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
         dc.GetTextExtent(tok, &x, &y);
         if ( curr_x + x > max_x)
         {
-            lines.Add( wxString(thisline) );
-            thisline = tok;
-            curr_x=x;
+            if ( curr_x == 0 )
+            {
+                // this means that a single token is wider than the maximal
+                // width -- still use it as is as we need to show at least the
+                // part of it which fits
+                lines.Add(tok);
+            }
+            else
+            {
+                lines.Add(thisline);
+                thisline = tok;
+                curr_x = x;
+            }
         }
         else
         {