From: Felix Domke Date: Mon, 27 Feb 2006 22:41:54 +0000 (+0000) Subject: fix currentCursorSelectable for multi content lists X-Git-Tag: 2.6.0~3959 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/11ba2aae74be4daa35434294fab8dda86fe78d6c?ds=sidebyside fix currentCursorSelectable for multi content lists --- diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index b4c80809..cec1ea8c 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -598,20 +598,17 @@ error_out: int eListboxPythonMultiContent::currentCursorSelectable() { + /* each list-entry is a list of tuples. if the first of these is none, it's not selectable */ if (m_list && cursorValid()) { PyObject *item = PyList_GET_ITEM(m_list, m_cursor); - if (PyList_Check(item)) - { - item = PyList_GET_ITEM(item, 0); - if (PyTuple_Check(item)) + if (PyList_Check(item)) { - item = PyTuple_GET_ITEM(item, 0); + item = PyList_GET_ITEM(item, 0); if (item != Py_None) return 1; } - } } return 0; }