File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def toClipboard(text):
1414
1515 See: https://discuss.wxpython.org/t/wx-theclipboard-pasting-different-content-on-every-second-paste/35361
1616 """
17- clipboard = wx .Clipboard ()
17+ clipboard = wx .TheClipboard
1818 try :
1919 # Explicitly use CLIPBOARD selection, not PRIMARY selection
2020 # This prevents X11 confusion between the two clipboard types
@@ -24,7 +24,6 @@ def toClipboard(text):
2424 try :
2525 data = wx .TextDataObject (text )
2626 clipboard .SetData (data )
27- clipboard .Flush () # Ensure clipboard manager gets the data
2827 return True
2928 finally :
3029 clipboard .Close ()
@@ -45,7 +44,7 @@ def fromClipboard():
4544
4645 See: https://discuss.wxpython.org/t/wx-theclipboard-pasting-different-content-on-every-second-paste/35361
4746 """
48- clipboard = wx .Clipboard ()
47+ clipboard = wx .TheClipboard
4948 try :
5049 # Explicitly use CLIPBOARD selection, not PRIMARY selection
5150 # This prevents X11 confusion between the two clipboard types
You can’t perform that action at this time.
0 commit comments