From 0183b47a45fc53256d18fbaa935e623cfa9fe8b0 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 1 Feb 2019 23:35:00 +0100 Subject: [PATCH] Fix build with wxUSE_CLIPBOARD==0 --- src/stc/ScintillaWX.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 12f6c593b7..e9ddba686d 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -520,7 +520,7 @@ void ScintillaWX::Paste() { pdoc->BeginUndoAction(); ClearSelection(multiPasteMode == SC_MULTIPASTE_EACH); -#if wxUSE_DATAOBJ +#if wxUSE_CLIPBOARD wxTextDataObject data; bool gotData = false; bool isRectangularClipboard = false; @@ -568,7 +568,7 @@ void ScintillaWX::Paste() { InsertPaste(buf, len); } } -#endif // wxUSE_DATAOBJ +#endif // wxUSE_CLIPBOARD pdoc->EndUndoAction(); NotifyChange(); @@ -660,6 +660,7 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { // can paste with the middle button. void ScintillaWX::ClaimSelection() { #ifdef __WXGTK__ +#if wxUSE_CLIPBOARD // Put the selected text in the PRIMARY selection if (!sel.Empty()) { SelectionText st; @@ -672,6 +673,7 @@ void ScintillaWX::ClaimSelection() { } wxTheClipboard->UsePrimarySelection(false); } +#endif // wxUSE_CLIPBOARD #endif } @@ -1073,6 +1075,7 @@ void ScintillaWX::DoMiddleButtonUp(Point pt) { int newPos = PositionFromLocation(pt); MovePositionTo(newPos, Selection::noSel, true); +#if wxUSE_CLIPBOARD pdoc->BeginUndoAction(); wxTextDataObject data; bool gotData = false; @@ -1094,6 +1097,7 @@ void ScintillaWX::DoMiddleButtonUp(Point pt) { pdoc->EndUndoAction(); NotifyChange(); Redraw(); +#endif // wxUSE_CLIPBOARD ShowCaretAtCurrentPosition(); EnsureCaretVisible();