Commits

Almar Klein committed 0d5bec3

fix issue #252: cursor stuck after dropping a file on Linux

Comments (0)

Files changed (2)

iep/codeeditor/misc.py

     Similarly this information is used by the setOptions method to
     know which members are "options".
     
-    """ 
+    """
     
     # If the decorator is used without arguments, arg1 is the function
     # being decorated. If arguments are used, arg1 is the argument, and

iep/iepcore/editor.py

     def _onModified(self):
         iep.parser.parseThis(self)
     
+    
+    def dragMoveEvent(self, event):
+        """ Otherwise cursor can get stuck.
+        https://bitbucket.org/iep-project/iep/issue/252
+        https://qt-project.org/forums/viewthread/3180
+        """
+        if event.mimeData().hasUrls():
+            event.acceptProposedAction()
+        else:
+            BaseTextCtrl.dropEvent(self, event)
+    
+    
     def dropEvent(self, event):
-        """ Drop files in the list. """        
+        """ Drop files in the list. """   
         if event.mimeData().hasUrls():
             # file: let the editorstack do the work.
             iep.editors.dropEvent(event)