beremiz

32445e3c9cfc
Parents 3220dd020675
Children 3da336a9664c
Catch 'clipboard already open' errors in editors

Apparently following commits have not fixed the problem completely,
because it still happens (although not so often).

changeset: 2019:b8f795bdfe9f
user: Andrey Skvortsov
date: Fri May 25 17:40:29 2018 +0300
summary: fix hangs on mouse selection in case if wxPython uses wxWidgets with GTK3+ support

changeset: 2018:5ce6d08ff2c7
user: Andrey Skvortsov
date: Fri May 25 17:23:15 2018 +0300
summary: make clipboard open minimal time as wxPython documentation recommends
  • +5 -1
    IDEFrame.py
  • --- a/IDEFrame.py Wed Jun 27 10:58:45 2018 +0300
    +++ b/IDEFrame.py Wed Jun 27 13:57:03 2018 +0300
    @@ -944,7 +944,11 @@
    if not wx.TheClipboard.IsOpened():
    dataobj = wx.TextDataObject()
    if wx.TheClipboard.Open():
    - success = wx.TheClipboard.GetData(dataobj)
    + success = False
    + try:
    + success = wx.TheClipboard.GetData(dataobj)
    + except wx._core.PyAssertionError:
    + pass
    wx.TheClipboard.Close()
    if success:
    data = dataobj.GetText()