E5ModelMenu: fixed an issue causing the menu not to be shown on some platforms (seen on Windows 7).

Fri, 24 May 2019 19:33:04 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 24 May 2019 19:33:04 +0200
changeset 7024
946f43137421
parent 7023
b025e93cc27d
child 7025
83e110e3fcc6

E5ModelMenu: fixed an issue causing the menu not to be shown on some platforms (seen on Windows 7).

eric6/E5Gui/E5ModelMenu.py file | annotate | diff | comparison | revisions
--- a/eric6/E5Gui/E5ModelMenu.py	Wed May 22 18:56:15 2019 +0200
+++ b/eric6/E5Gui/E5ModelMenu.py	Fri May 24 19:33:04 2019 +0200
@@ -370,6 +370,10 @@
             super(E5ModelMenu, self).mouseMoveEvent(evt)
             return
         
+        if self.__dragStartPosition.isNull():
+            super(E5ModelMenu, self).mouseMoveEvent(evt)
+            return
+        
         manhattanLength = (evt.pos() -
                            self.__dragStartPosition).manhattanLength()
         if manhattanLength <= QApplication.startDragDistance():
@@ -413,6 +417,10 @@
         """
         self._mouseButton = evt.button()
         self._keyboardModifiers = evt.modifiers()
+        
+        if evt.button() == Qt.LeftButton:
+            self.__dragStartPosition = QPoint()
+        
         super(E5ModelMenu, self).mouseReleaseEvent(evt)
     
     def resetFlags(self):

eric ide

mercurial