cursor image type fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,11 +165,12 @@ class Tools(wx.Panel):
|
|||||||
do = MyDataObject()
|
do = MyDataObject()
|
||||||
do.SetData(str(evt.GetId()))
|
do.SetData(str(evt.GetId()))
|
||||||
bm = evt.GetEventObject().GetBitmapLabel()
|
bm = evt.GetEventObject().GetBitmapLabel()
|
||||||
if wx.Platform != '__WXMAC__':
|
# wxGTK requires wxIcon cursor, wxWIN and wxMAC require wxCursor
|
||||||
|
if wx.Platform == '__WXGTK__':
|
||||||
icon = wx.EmptyIcon()
|
icon = wx.EmptyIcon()
|
||||||
icon.CopyFromBitmap(bm)
|
icon.CopyFromBitmap(bm)
|
||||||
dragSource = wx.DropSource(self, icon)
|
dragSource = wx.DropSource(self, icon)
|
||||||
else: # on Mac DragSource requires cursor (but does not work anyway)
|
else:
|
||||||
curs = wx.CursorFromImage(wx.ImageFromBitmap(bm))
|
curs = wx.CursorFromImage(wx.ImageFromBitmap(bm))
|
||||||
dragSource = wx.DropSource(self, curs)
|
dragSource = wx.DropSource(self, curs)
|
||||||
dragSource.SetData(do)
|
dragSource.SetData(do)
|
||||||
|
Reference in New Issue
Block a user