X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76b49cf49ba9ee9f3eeec9730cb4bc4569ab17f1..797e38dde12c5dc2d99070eef25d9b8c2549d621:/src/mac/carbon/clipbrd.cpp diff --git a/src/mac/carbon/clipbrd.cpp b/src/mac/carbon/clipbrd.cpp index 0b9c1a831d..413b80df02 100644 --- a/src/mac/carbon/clipbrd.cpp +++ b/src/mac/carbon/clipbrd.cpp @@ -22,9 +22,9 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/frame.h" + #include "wx/bitmap.h" #endif -#include "wx/bitmap.h" #include "wx/metafile.h" #ifndef __DARWIN__ @@ -173,6 +173,9 @@ wxClipboard::~wxClipboard() void wxClipboard::Clear() { + if ( IsUsingPrimarySelection() ) + return; + if (m_data != NULL) { delete m_data; @@ -214,6 +217,9 @@ bool wxClipboard::IsOpened() const bool wxClipboard::SetData( wxDataObject *data ) { + if ( IsUsingPrimarySelection() ) + return false; + wxCHECK_MSG( m_open, false, wxT("clipboard not open") ); wxCHECK_MSG( data, false, wxT("data is invalid") ); @@ -226,6 +232,9 @@ bool wxClipboard::SetData( wxDataObject *data ) bool wxClipboard::AddData( wxDataObject *data ) { + if ( IsUsingPrimarySelection() ) + return false; + wxCHECK_MSG( m_open, false, wxT("clipboard not open") ); wxCHECK_MSG( data, false, wxT("data is invalid") ); @@ -320,6 +329,9 @@ void wxClipboard::Close() bool wxClipboard::IsSupported( const wxDataFormat &dataFormat ) { + if ( IsUsingPrimarySelection() ) + return false; + if ( m_data ) return m_data->IsSupported( dataFormat ); @@ -370,6 +382,9 @@ bool wxClipboard::IsSupported( const wxDataFormat &dataFormat ) bool wxClipboard::GetData( wxDataObject& data ) { + if ( IsUsingPrimarySelection() ) + return false; + wxCHECK_MSG( m_open, false, wxT("clipboard not open") ); size_t formatcount = data.GetFormatCount() + 1;