Skip to content

Commit d901d33

Browse files
Fix symbol browser panel
1 parent 11373fe commit d901d33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pyqode/python/panels/symbol_browser.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def flatten(results):
6666
for sub_d in de.children:
6767
nd = Definition(
6868
sub_d.name, sub_d.line, sub_d.column, sub_d.icon)
69-
nd.name = " " + nd.name
69+
nd.name = " " + nd.name
7070
ret_val.append(nd)
7171
return ret_val
7272

@@ -80,7 +80,11 @@ def flatten(results):
8080
else:
8181
self.combo_box.addItem("No symbols")
8282
for d in definitions:
83-
self.combo_box.addItem(QtGui.QIcon(d.icon), d.name, d)
83+
try:
84+
self.combo_box.addItem(QtGui.QIcon(d.icon), d.name, d)
85+
except TypeError:
86+
self.combo_box.addItem(QtGui.QIcon.fromTheme(
87+
d.icon[0], QtGui.QIcon(d.icon[1])), d.name, d)
8488
self._definitions = definitions
8589
self._sync_combo_box(TextHelper(self.editor).current_line_nbr())
8690

0 commit comments

Comments
 (0)