]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridctrl.cpp
Use gdk_window_invalidate instead of gtk_widget_queue_draw as the latter doesn't...
[wxWidgets.git] / src / generic / gridctrl.cpp
index d1df91d0991323f1c4601ad4b90819ebbe9785e1..3098fd5ad597c4a6e4f46c2c26108290a694879a 100644 (file)
@@ -24,6 +24,9 @@
     #include "wx/textctrl.h"
     #include "wx/dc.h"
     #include "wx/combobox.h"
+       #include "wx/settings.h"
+    #include "wx/log.h"
+    #include "wx/checkbox.h"
 #endif // WX_PRECOMP
 
 #include "wx/tokenzr.h"
@@ -277,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
         {