Redefine cursor switching procedure in graphic viewers
authorlaurent
Fri, 24 Jul 2009 09:55:11 +0200
changeset 382 42a9b03bba82
parent 381 98890d848701
child 383 25ffba02b6a8
Redefine cursor switching procedure in graphic viewers
LDViewer.py
SFCViewer.py
--- a/LDViewer.py	Thu Jul 23 18:07:14 2009 +0200
+++ b/LDViewer.py	Fri Jul 24 09:55:11 2009 +0200
@@ -358,7 +358,7 @@
                     else:
                         element.OnLeftUp(event, dc, self.Scaling)
             self.SelectedElement.Refresh()
-            wx.CallAfter(self.SetCursor, wx.NullCursor)
+            wx.CallAfter(self.SetCurrentCursor, 0)
         event.Skip()
 
     def OnViewerRightUp(self, event):
@@ -378,7 +378,7 @@
                     self.SelectedElement.SetSelected(True)
                     self.SelectedElement.OnRightUp(event, dc, self.Scaling)
                     self.SelectedElement.Refresh()
-                wx.CallAfter(self.SetCursor, wx.NullCursor)
+                wx.CallAfter(self.SetCurrentCursor, 0)
         event.Skip()
 
     def OnViewerLeftDClick(self, event):
--- a/SFCViewer.py	Thu Jul 23 18:07:14 2009 +0200
+++ b/SFCViewer.py	Fri Jul 24 09:55:11 2009 +0200
@@ -230,7 +230,7 @@
             else:
                 self.SelectedElement.OnLeftUp(event, self.GetLogicalDC(), self.Scaling)
                 self.SelectedElement.Refresh()
-            wx.CallAfter(self.SetCursor, wx.NullCursor)
+            wx.CallAfter(self.SetCurrentCursor, 0)
         elif self.Mode == MODE_WIRE and self.SelectedElement:
             self.SelectedElement.ResetPoints()
             self.SelectedElement.OnMotion(event, self.GetLogicalDC(), self.Scaling)
@@ -256,7 +256,7 @@
                     self.SelectedElement.SetSelected(True)
                     self.SelectedElement.OnRightUp(event, dc, self.Scaling)
                     self.SelectedElement.Refresh()
-                wx.CallAfter(self.SetCursor, wx.NullCursor)
+                wx.CallAfter(self.SetCurrentCursor, 0)
         event.Skip()
     
     def OnViewerLeftDClick(self, event):