git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74361
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxRichTextCaret::DoDraw(wxDC *dc)
{
void wxRichTextCaret::DoDraw(wxDC *dc)
{
- dc->SetBrush((m_hasFocus ? m_caretBrush : *wxTRANSPARENT_BRUSH));
- dc->SetPen(m_caretPen);
+ wxBrush brush(m_caretBrush);
+ wxPen pen(m_caretPen);
+ if (m_richTextCtrl && m_richTextCtrl->GetBasicStyle().HasTextColour())
+ {
+ brush = wxBrush(m_richTextCtrl->GetBasicStyle().GetTextColour());
+ pen = wxPen(m_richTextCtrl->GetBasicStyle().GetTextColour());
+ }
+ dc->SetBrush((m_hasFocus ? brush : *wxTRANSPARENT_BRUSH));
+ dc->SetPen(pen);