Steve Borho avatar Steve Borho committed 65a385c

wctxactions: give parent to transient menus (closes #716)

Comments (0)

Files changed (1)


         t, path = selrows[0]
         wctx = self.repo[None]
         if t & frozenset('?') and wctx.deleted():
-            rmenu = QMenu(_('Was renamed from'))
+            rmenu = QMenu(_('Was renamed from'), self.parent())
             for d in wctx.deleted()[:15]:
                 def mkaction(deleted):
                     a = rmenu.addAction(hglib.tounicode(deleted))
                     a.triggered.connect(lambda: renamefromto(repo, deleted, path))
+            menu.addSeparator()
         # Add restart merge actions for resolved files
         if alltypes & frozenset('u'):
             f = make(_('Restart Merge...'), resolve, frozenset('u'))
             files = [f for t, f in selrows if 'u' in t]
-            rmenu = QMenu(_('Restart merge with'))
+            rmenu = QMenu(_('Restart merge with'), self.parent())
             for tool in hglib.mergetools(repo.ui):
                 def mkaction(rtool):
                     a = rmenu.addAction(hglib.tounicode(rtool))
                     a.triggered.connect(lambda: resolve_with(rtool, repo, files))
+            menu.addSeparator()
         return menu
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.