Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ff4b0e

Browse filesBrowse files
committed
Small simplification to triage_tests.py.
1 parent 327cfcf commit 3ff4b0e
Copy full SHA for 3ff4b0e

File tree

Expand file treeCollapse file tree

1 file changed

+3
-14
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-14
lines changed

‎tools/triage_tests.py

Copy file name to clipboardExpand all lines: tools/triage_tests.py
+3-14Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,6 @@ def mousePressEvent(self, event):
7676
self.parent.set_large_image(self.index)
7777

7878

79-
class ListWidget(QtWidgets.QListWidget):
80-
"""
81-
The list of files on the left-hand side
82-
"""
83-
def __init__(self, parent):
84-
super().__init__()
85-
self.parent = parent
86-
self.currentRowChanged.connect(self.change_row)
87-
88-
def change_row(self, i):
89-
self.parent.set_entry(i)
90-
91-
9279
class EventFilter(QtCore.QObject):
9380
# A hack keypresses can be handled globally and aren't swallowed
9481
# by the individual widgets
@@ -119,10 +106,12 @@ def __init__(self, entries):
119106
event_filter = EventFilter(self)
120107
self.installEventFilter(event_filter)
121108

122-
self.filelist = ListWidget(self)
109+
# The list of files on the left-hand side.
110+
self.filelist = QtWidgets.QListWidget()
123111
self.filelist.setMinimumWidth(400)
124112
for entry in entries:
125113
self.filelist.addItem(entry.display)
114+
self.filelist.currentRowChanged.connect(self.set_entry)
126115

127116
thumbnails_box = QtWidgets.QWidget()
128117
thumbnails_layout = QtWidgets.QVBoxLayout()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.