]> git.saurik.com Git - wxWidgets.git/commitdiff
Some updates for 2.3.3
authorRobin Dunn <robin@alldunn.com>
Mon, 15 Apr 2002 17:30:02 +0000 (17:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 15 Apr 2002 17:30:02 +0000 (17:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wxPython/lib/editor/editor.py

index e02d521f46082f9fd656c8cc5d5f3dcba2ed35f6..3f7c57ae889517c2d2950656d24424ab0ec25b21 100644 (file)
@@ -449,7 +449,7 @@ class wxEditor(wxScrolledWindow):
         self.MouseToCol(event.GetX())
 
     def OnMotion(self, event):
         self.MouseToCol(event.GetX())
 
     def OnMotion(self, event):
-        if event.LeftIsDown():
+        if event.LeftIsDown() and self.HasCapture():
             self.Selecting = true
             self.MouseToCursor(event)
             self.SelectUpdate()
             self.Selecting = true
             self.MouseToCursor(event)
             self.SelectUpdate()
@@ -462,6 +462,9 @@ class wxEditor(wxScrolledWindow):
         self.CaptureMouse()
 
     def OnLeftUp(self, event):
         self.CaptureMouse()
 
     def OnLeftUp(self, event):
+        if not self.HasCapture():
+            return
+
         if self.SelectEnd is None:
             self.OnClick()
         else:
         if self.SelectEnd is None:
             self.OnClick()
         else: