X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eaaf10f671951c3dc50e37e5bb1031d3b5148767..c37b0f0907b07878551a00165b0ad323bd2ccdaf:/src/richtext/richtextctrl.cpp diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 8ece5a710d..69151389e1 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2005-09-30 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -2665,7 +2664,7 @@ bool wxRichTextCtrl::RecreateBuffer(const wxSize& size) // ---------------------------------------------------------------------------- // file IO functions // ---------------------------------------------------------------------------- - +#if wxUSE_FFILE && wxUSE_STREAMS bool wxRichTextCtrl::DoLoadFile(const wxString& filename, int fileType) { SetFocusObject(& GetBuffer(), true); @@ -2707,6 +2706,7 @@ bool wxRichTextCtrl::DoSaveFile(const wxString& filename, int fileType) return false; } +#endif // wxUSE_FFILE && wxUSE_STREAMS // ---------------------------------------------------------------------------- // wxRichTextCtrl specific functionality @@ -4863,8 +4863,15 @@ void wxRichTextCaret::Refresh() 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); wxPoint pt(m_x, m_y);