Browse Source

wxGUI: bug fix -- trac https://trac.osgeo.org/grass/ticket/281 (query tool crashes when the user presses mouse buttons fast)
(merge from devbr6, https://trac.osgeo.org/grass/changeset/33257)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33258 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 years ago
parent
commit
b4d124f5ca
1 changed files with 7 additions and 4 deletions
  1. 7 4
      gui/wxpython/gui_modules/goutput.py

+ 7 - 4
gui/wxpython/gui_modules/goutput.py

@@ -83,12 +83,15 @@ class CmdThread(threading.Thread):
 
 
             self.resultQ.put((requestId, self.requestCmd.run()))
             self.resultQ.put((requestId, self.requestCmd.run()))
 
 
-            event = wxCmdDone(aborted=self.requestCmd.aborted,
+            try:
+                aborted = self.requestCmd.aborted
+            except AttributeError:
+                aborted = False
+            
+            event = wxCmdDone(aborted=aborted,
                               time=requestTime,
                               time=requestTime,
                               pid=requestId)
                               pid=requestId)
-
-            time.sleep(.1)
-
+            
             wx.PostEvent(self.parent, event)
             wx.PostEvent(self.parent, event)
 
 
     def abort(self):
     def abort(self):