]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbulletspage.cpp
When selecting the bitmap bullet style, the name can now be edited since it could...
[wxWidgets.git] / src / richtext / richtextbulletspage.cpp
index 6932dab9dfbaa85e930eff7470523b54f7b9f26c..6fa41176481af1793b3997f77bb4ae705f80f1aa 100644 (file)
@@ -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 );
 }