fix currentCursorSelectable for multi content lists
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 27 Feb 2006 22:41:54 +0000 (22:41 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 27 Feb 2006 22:41:54 +0000 (22:41 +0000)
lib/gui/elistboxcontent.cpp

index b4c8080..cec1ea8 100644 (file)
@@ -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;
 }