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
This commit is contained in:
Julian Smart
2013-01-19 18:26:13 +00:00
parent 4787c92d39
commit 0ab8f4023c
2 changed files with 14 additions and 4 deletions

View 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 );
}

View 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_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();
}