From e8e94d3c99435a950f047421835a53580add9f5c Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sat, 20 Jun 2009 23:26:05 +0000 Subject: [PATCH] Patch from Bruno Daniel to fix tab position inconsistency git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index a6f293b898..6ba6591aca 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -5313,6 +5313,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttrEx& attr, c dc.SetBackgroundMode(wxTRANSPARENT); } + wxCoord x_orig = x; while (hasTabs) { // the string has a tab @@ -5324,7 +5325,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttrEx& attr, c 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.