git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35977
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
bool success = false;
wxString text = GetTextForRange(range);
- if (wxTheClipboard->Open())
+ if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
{
success = wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
bool wxRichTextBuffer::CanPasteFromClipboard() const
{
bool canPaste = false;
- if (wxTheClipboard->Open())
+ if (!wxTheClipboard->IsOpened() && wxTheClipboard->Open())
{
if (wxTheClipboard->IsSupported(wxDF_TEXT) || wxTheClipboard->IsSupported(wxDF_BITMAP))
{
/// Painting
void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
{
+ if (GetCaret())
+ GetCaret()->Hide();
+
{
wxBufferedPaintDC dc(this, m_bufferBitmap);
//wxLogDebug(wxT("OnPaint"));
GetBuffer().Draw(dc, GetBuffer().GetRange(), GetSelectionRange(), drawingArea, 0 /* descent */, 0 /* flags */);
}
+
+ if (GetCaret())
+ GetCaret()->Show();
+
PositionCaret();
}