remove some debug prints
[enigma2.git] / lib / gui / elistbox.cpp
index 9b876c8c6c58bfbfc3a2759122baa72c8695e7b9..21394de5ac4f827d26efe9ffa6f069aad9630cc0 100644 (file)
@@ -20,6 +20,9 @@ eListbox::eListbox(eWidget *parent)
 
 eListbox::~eListbox()
 {
+       if (m_scrollbar)
+               delete m_scrollbar;
+       
        ePtr<eActionMap> ptr;
        eActionMap::getInstance(ptr);
        ptr->unbindAction(this, 0);
@@ -268,7 +271,7 @@ void eListbox::recalcSize()
        m_prev_scrollbar_page=-1;
        m_content->setSize(eSize(size().width(), m_itemheight));
        m_items_per_page = size().height() / m_itemheight;
-       updateScrollBar();
+       moveSelection(justCheck);
 }
 
 void eListbox::setItemHeight(int h)
@@ -333,15 +336,17 @@ void eListbox::entryChanged(int index)
        }
 }
 
-void eListbox::entryReset()
+void eListbox::entryReset(bool cursorHome)
 {
        m_content_changed=true;
        m_prev_scrollbar_page=-1;
-       if (m_content)
-               m_content->cursorHome();
-       m_top = 0;
-       m_selected = 0;
+       if ( cursorHome )
+       {
+               if (m_content)
+                       m_content->cursorHome();
+               m_top = 0;
+               m_selected = 0;
+       }
        moveSelection(justCheck);
-       updateScrollBar();
        invalidate();
 }