Fixed wrapping with tabs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3921,9 +3921,11 @@ bool wxRichTextParagraph::FindWrapPosition(const wxRichTextRange& range, wxDC& d
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int spacePos = plainText.Find(wxT(' '), true);
|
int spacePos = plainText.Find(wxT(' '), true);
|
||||||
if (spacePos != wxNOT_FOUND)
|
int tabPos = plainText.Find(wxT('\t'), true);
|
||||||
|
int pos = wxMax(spacePos, tabPos);
|
||||||
|
if (pos != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
int positionsFromEndOfString = plainText.length() - spacePos - 1;
|
int positionsFromEndOfString = plainText.length() - pos - 1;
|
||||||
breakPosition = breakPosition - positionsFromEndOfString;
|
breakPosition = breakPosition - positionsFromEndOfString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4343,7 +4345,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttrEx& attr, c
|
|||||||
else
|
else
|
||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (hasTabs)
|
while (hasTabs)
|
||||||
{
|
{
|
||||||
// the string has a tab
|
// the string has a tab
|
||||||
|
Reference in New Issue
Block a user