From: Julian Smart Date: Sat, 19 Jan 2013 18:26:13 +0000 (+0000) Subject: When selecting the bitmap bullet style, the name can now be edited since it could... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0ab8f4023c8bea18c31bca1215bc57d6c9e0fb24?ds=inline When selecting the bitmap bullet style, the name can now be edited since it could be used for providing the bullet image. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextbulletspage.cpp b/src/richtext/richtextbulletspage.cpp index 6932dab9df..6fa4117648 100644 --- a/src/richtext/richtextbulletspage.cpp +++ b/src/richtext/richtextbulletspage.cpp @@ -364,7 +364,13 @@ bool wxRichTextBulletsPage::TransferDataFromWindow() bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL; else if (index == wxRICHTEXT_BULLETINDEX_BITMAP) + { bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_BITMAP; + if (m_bulletNameCtrl->GetValue().IsEmpty()) + attr->SetFlags(attr->GetFlags() & ~wxTEXT_ATTR_BULLET_NAME); + else + attr->SetBulletName(m_bulletNameCtrl->GetValue()); + } else if (index == wxRICHTEXT_BULLETINDEX_STANDARD) { @@ -866,7 +872,7 @@ void wxRichTextBulletsPage::OnNumberUpdate( wxUpdateUIEvent& event ) void wxRichTextBulletsPage::OnStandardBulletUpdate( wxUpdateUIEvent& event ) { int sel = m_styleListBox->GetSelection(); - event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD ); + event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD || sel == wxRICHTEXT_BULLETINDEX_BITMAP ); } diff --git a/src/richtext/richtextliststylepage.cpp b/src/richtext/richtextliststylepage.cpp index 2eb6fdd062..4acdca6a2a 100644 --- a/src/richtext/richtextliststylepage.cpp +++ b/src/richtext/richtextliststylepage.cpp @@ -666,7 +666,13 @@ bool wxRichTextListStylePage::TransferDataFromWindow() bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL; else if (index == wxRICHTEXT_BULLETINDEX_BITMAP) + { bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_BITMAP; + if (m_bulletNameCtrl->GetValue().IsEmpty()) + attr->SetFlags(attr->GetFlags() & ~wxTEXT_ATTR_BULLET_NAME); + else + attr->SetBulletName(m_bulletNameCtrl->GetValue()); + } else if (index == wxRICHTEXT_BULLETINDEX_STANDARD) { @@ -1262,7 +1268,7 @@ void wxRichTextListStylePage::OnNumberUpdate( wxUpdateUIEvent& event ) void wxRichTextListStylePage::OnStandardBulletUpdate( wxUpdateUIEvent& event ) { int sel = m_styleListBox->GetSelection(); - event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD ); + event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD || sel == wxRICHTEXT_BULLETINDEX_BITMAP ); } /*! @@ -1348,5 +1354,3 @@ void wxRichTextListStylePage::OnBulletAlignmentCtrlSelected( wxCommandEvent& WXU { TransferAndPreview(); } - -