Corrected an issue showing the tray starter menu. eric7

Fri, 21 Mar 2025 16:27:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 21 Mar 2025 16:27:43 +0100
branch
eric7
changeset 11180
b00fee34ea40
parent 11179
37788ec8e6d2
child 11181
52e30cc024aa

Corrected an issue showing the tray starter menu.

src/eric7/Tools/TrayStarter.py file | annotate | diff | comparison | revisions
--- a/src/eric7/Tools/TrayStarter.py	Fri Mar 21 15:15:44 2025 +0100
+++ b/src/eric7/Tools/TrayStarter.py	Fri Mar 21 16:27:43 2025 +0100
@@ -243,6 +243,8 @@
             EricPixmapCache.getIcon("exit"), self.tr("Quit"), ericApp().quit
         )
 
+        self.setContextMenu(self.__menu)
+
     def __loadRecentProjects(self):
         """
         Private method to load the recently opened project filenames.
@@ -296,13 +298,6 @@
         self.menuRecentMultiProjectsAct.setEnabled(len(self.recentMultiProjects) > 0)
         self.menuRecentFilesAct.setEnabled(len(self.recentFiles) > 0)
 
-        pos = QCursor.pos()
-        x = pos.x() - self.__menu.sizeHint().width()
-        pos.setX(x > 0 and x or 0)
-        y = pos.y() - self.__menu.sizeHint().height()
-        pos.setY(y > 0 and y or 0)
-        self.__menu.popup(pos)
-
     def __startProc(self, applName, *applArgs):
         """
         Private method to start an eric application.

eric ide

mercurial