Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

revdetails: Generate the file and subrepo context menus only once

Changeset ae92f1c4bbba

Parent bb945ff79c3a

by Angel Ezquerra

Changes to one file · Browse files at ae92f1c4bbba Showing diff from parent bb945ff79c3a Diff from another changeset...

 
383
384
385
 
386
387
388
 
390
391
392
393
 
 
 
 
 
 
 
 
394
395
396
 
383
384
385
386
387
388
389
 
391
392
393
 
394
395
396
397
398
399
400
401
402
403
404
@@ -383,6 +383,7 @@
  contextmenu = self.filecontextmenu   actionlist = ['diff', 'ldiff', 'edit', 'ledit', 'revert',   'navigate', 'diffnavigate'] +   if not contextmenu:   contextmenu = QMenu(self)   for act in actionlist: @@ -390,7 +391,14 @@
  contextmenu.addAction(self._actions[act])   else:   contextmenu.addSeparator() - contextmenu.exec_(self.filelist.mapToGlobal(point)) + + if itemissubrepo: + self.subrepocontextmenu = contextmenu + else: + self.filecontextmenu = contextmenu + + if actionlist: + contextmenu.exec_(self.filelist.mapToGlobal(point))     def saveSettings(self, s):   wb = "RevDetailsWidget/"