Fix comment and call to UsePrimarySelection() in text sample

The call actually did nothing, but the comment implied that it did, as
if the default argument to UsePrimarySelection() were "true" -- which is
not, and never has been, the case.

Reduce confusion by clarifying what's going on here and passing an
explicit argument.
This commit is contained in:
Vadim Zeitlin
2024-03-21 18:20:47 +01:00
parent 847c750b69
commit d0cc8911fd
+3 -4
View File
@@ -1315,10 +1315,9 @@ wxTextCtrl *MyPanel::GetFocusedText() const
#if wxUSE_CLIPBOARD
void MyPanel::SelectClipboardSelection()
{
// On X11, we want to get the data from the primary selection instead
// of the normal clipboard (which isn't normal under X11 at all). This
// call has no effect under MSW.
wxTheClipboard->UsePrimarySelection();
// On X11, we want to exchange data with the clipboard selection instead
// of the primary selection -- which is actually the case by default.
wxTheClipboard->UsePrimarySelection(false);
}
void MyPanel::DoPasteFromClipboard()