X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a492bccff908b828de50f2e1bafdc5f01bed03f7..bbd55ff9564dcaf1a5d2ee93d789c4d656baabef:/src/richtext/richtextbuffer.cpp diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index c4b472a491..ab926437d8 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -2654,6 +2654,13 @@ bool wxRichTextParagraphLayoutBox::ApplyStyleSheet(wxRichTextStyleSheet* styleSh // So when changing a list style interactively, could retrieve level based on current style, then // set appropriate indent and apply new style. + int outline = -1; + int num = -1; + if (para->GetAttributes().HasOutlineLevel()) + outline = para->GetAttributes().GetOutlineLevel(); + if (para->GetAttributes().HasBulletNumber()) + num = para->GetAttributes().GetBulletNumber(); + if (!para->GetAttributes().GetParagraphStyleName().IsEmpty() && !para->GetAttributes().GetListStyleName().IsEmpty()) { int currentIndent = para->GetAttributes().GetLeftIndent(); @@ -2704,6 +2711,11 @@ bool wxRichTextParagraphLayoutBox::ApplyStyleSheet(wxRichTextStyleSheet* styleSh foundCount ++; } } + + if (outline != -1) + para->GetAttributes().SetOutlineLevel(outline); + if (num != -1) + para->GetAttributes().SetBulletNumber(num); } node = node->GetNext();