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

stable status: open visual diffs on double-click event

Changeset 5b1e5f2e1896

Parent f51b46bc7809

by Steve Borho

Changes to one file · Browse files at 5b1e5f2e1896 Showing diff from parent f51b46bc7809 Diff from another changeset...

 
415
416
417
 
418
419
420
 
422
423
424
 
 
 
 
 
 
 
 
425
426
427
 
415
416
417
418
419
420
421
 
423
424
425
426
427
428
429
430
431
432
433
434
435
436
@@ -415,6 +415,7 @@
  self.setContextMenuPolicy(Qt.CustomContextMenu)   self.customContextMenuRequested.connect(self.menuRequested)   self.setTextElideMode(Qt.ElideLeft) + self.doubleClicked.connect(self.onDoubleClick)     def scrollTo(self, index, hint=QAbstractItemView.EnsureVisible):   # don't update horizontal position by selection change @@ -422,6 +423,14 @@
  super(WctxFileTree, self).scrollTo(index, hint)   self.horizontalScrollBar().setValue(orighoriz)   + def onDoubleClick(self, index): + if not index.isValid(): + return + path = self.model().getRow(index)[COL_PATH] + dlg = visdiff.visualdiff(self.repo.ui, self.repo, [path], {}) + if dlg: + dlg.exec_() +   def keyPressEvent(self, event):   if event.key() == 32:   for index in self.selectedRows():