From 11ba2aae74be4daa35434294fab8dda86fe78d6c Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 27 Feb 2006 22:41:54 +0000 Subject: [PATCH] fix currentCursorSelectable for multi content lists --- lib/gui/elistboxcontent.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; } -- 2.30.2