X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a9f8b624a019abc105b248885c98a71d37803e88..76ab06c06bdf77f0b0cecd225367862ef0de0d2f:/lib/gui/elistboxcontent.cpp diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index fd7341a9..585d6fec 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -262,7 +262,8 @@ void eListboxPythonStringContent::invalidate() int s = size(); if ( m_cursor >= s ) m_listbox->moveSelectionTo(s?s-1:0); - m_listbox->invalidate(); + else + m_listbox->invalidate(); } } @@ -430,6 +431,8 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, if (plist && PyList_Check(plist)) entries = PyList_Size(plist); + int left=0, right=0, last=-1; + eRect bbox; for (int i = 0; i < entries; ++i) { ePyObject entry = PyList_GET_ITEM(plist, i); @@ -439,15 +442,23 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, eWarning("glyph index %d in PythonConfigList out of bounds!", num); else { + if (last+1 != num && last != -1) { + bbox = eRect(left, offset.y(), right-left, m_itemsize.height()); + painter.fill(bbox); + } para->setGlyphFlag(num, GS_INVERT); - eRect bbox; bbox = para->getGlyphBBox(num); - bbox = eRect(bbox.left(), offset.y(), bbox.width(), m_itemsize.height()); - painter.fill(bbox); + if (last+1 != num || last == -1) + left = bbox.left(); + right = bbox.left() + bbox.width(); + last = num; } /* entry is borrowed */ } - + if (last != -1) { + bbox = eRect(left, offset.y(), right-left, m_itemsize.height()); + painter.fill(bbox); + } painter.renderPara(para, ePoint(0, 0)); /* pvalue is borrowed */ /* plist is 0 or borrowed */ @@ -1021,3 +1032,9 @@ void eListboxPythonMultiContent::updateClip(gRegion &clip) else m_old_clip = m_clip = gRegion::invalidRegion(); } + +void eListboxPythonMultiContent::entryRemoved(int idx) +{ + if (m_listbox) + m_listbox->entryRemoved(idx); +}