Don't reset bullet number and outline number when applying style sheet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@65169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2010-08-03 17:14:54 +00:00
parent a2ac9be2ac
commit bc830a8714

View File

@@ -3183,6 +3183,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();
@@ -3233,6 +3240,11 @@ bool wxRichTextParagraphLayoutBox::ApplyStyleSheet(wxRichTextStyleSheet* styleSh
foundCount ++;
}
}
if (outline != -1)
para->GetAttributes().SetOutlineLevel(outline);
if (num != -1)
para->GetAttributes().SetBulletNumber(num);
}
node = node->GetNext();