Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

grep: Escape cancels current search

Changeset f2b7cd75a6fc

Parent 9126fd01106d

by Steve Borho

Changes to one file · Browse files at f2b7cd75a6fc Showing diff from parent 9126fd01106d Diff from another changeset...

 
27
28
29
30
31
32
33
 
78
79
80
81
 
 
 
 
 
 
 
 
82
83
84
 
27
28
29
 
30
31
32
 
77
78
79
 
80
81
82
83
84
85
86
87
88
89
90
@@ -27,7 +27,6 @@
 # context menu for matches  # emit errors to parent's status bar  # emit to parent's progress bar -# ESC should cancel current search  # turn HTMLDelegate into a column delegate, merge back with htmllistview    class SearchWidget(QWidget): @@ -78,7 +77,14 @@
    def keyPressEvent(self, event):   if event.key() == Qt.Key_Escape: - self.close() + if self.thread and self.thread.isRunning(): + self.thread.terminate() + self.thread.wait() + for col in xrange(COL_TEXT): + self.tv.resizeColumnToContents(col) + self.le.setEnabled(True) + else: + self.close()   else:   return super(SearchWidget, self).keyPressEvent(event)