From: Felix Domke Date: Mon, 27 Feb 2006 22:41:54 +0000 (+0000) Subject: fix currentCursorSelectable for multi content lists X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=11ba2aae74be4daa35434294fab8dda86fe78d6c fix currentCursorSelectable for multi content lists --- diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index b4c8080..cec1ea8 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; }