]> git.saurik.com Git - wxWidgets.git/commitdiff
Patch from Bruno Daniel to fix tab position inconsistency
authorJulian Smart <julian@anthemion.co.uk>
Sat, 20 Jun 2009 23:26:20 +0000 (23:26 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 20 Jun 2009 23:26:20 +0000 (23:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 82c529fa111c4b3e53f571af327a8b708f8e3fc2..7ac71cfc9f83495c530da56f1e19f2ee6102cd4a 100644 (file)
@@ -4794,6 +4794,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con
             dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
     }
 
+       wxCoord x_orig = x;
     while (hasTabs)
     {
         // the string has a tab
@@ -4805,7 +4806,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con
         bool not_found = true;
         for (int i = 0; i < tabCount && not_found; ++i)
         {
-            nextTabPos = tabArray.Item(i);
+            nextTabPos = tabArray.Item(i) + x_orig;
 
             // Find the next tab position.
             // Even if we're at the end of the tab array, we must still draw the chunk.