Skip to content

Commit 0ee2fc0

Browse files
Janne Härkönenyanne
authored andcommitted
adapt to different constructors in 2.8 vs. 3.0
1 parent 3a4b2ef commit 0ee2fc0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/robotide/ui/tree.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,12 @@ def _create_node_with_handler(self, parent_node, controller, index=None):
287287
index, with_checkbox=(handler_class == TestCaseHandler and self._checkboxes_for_tests))
288288
if isinstance(controller, ResourceFileController):
289289
if not controller.is_used():
290-
self.SetItemTextColour(node, Colour(0xA9, 0xA9, 0xA9))
290+
try:
291+
colour = Colour(0xA9A9A9)
292+
except:
293+
#wxPython 3.0 compatibilty
294+
colour = Colour(0xA9, 0xA9, 0xA9)
295+
self.SetItemTextColour(node, colour)
291296
self.SetPyData(node, handler_class(controller, self, node, self._controller.settings))
292297
if controller.is_excluded():
293298
self._set_item_excluded(node)

0 commit comments

Comments
 (0)