]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextliststylepage.cpp
Ensure there is valid context for DrawRectangle
[wxWidgets.git] / src / richtext / richtextliststylepage.cpp
index 2eb6fdd06296b42bd87f3a699ded913f8903a1d0..4acdca6a2a2b9336b41730070789a24872b70f4b 100644 (file)
@@ -666,7 +666,13 @@ bool wxRichTextListStylePage::TransferDataFromWindow()
             bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL;
 
         else if (index == wxRICHTEXT_BULLETINDEX_BITMAP)
             bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL;
 
         else if (index == wxRICHTEXT_BULLETINDEX_BITMAP)
+        {
             bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_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)
         {
 
         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();
 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();
 }
 {
     TransferAndPreview();
 }
-
-