Commit 6e6cae5b authored by Olivier Teulière's avatar Olivier Teulière

* skins2/controls/ctrl_tree.cpp: Fixed a nasty bug. The tree playlist should

   now be much more stable.
parent 81b184ba
......@@ -43,19 +43,19 @@
CtrlTree::CtrlTree( intf_thread_t *pIntf,
VarTree &rTree,
const GenericFont &rFont,
const GenericBitmap *pBgBitmap,
const GenericBitmap *pItemBitmap,
const GenericBitmap *pOpenBitmap,
const GenericBitmap *pClosedBitmap,
uint32_t fgColor,
uint32_t playColor,
uint32_t bgColor1,
uint32_t bgColor2,
uint32_t selColor,
const UString &rHelp,
VarBool *pVisible ):
VarTree &rTree,
const GenericFont &rFont,
const GenericBitmap *pBgBitmap,
const GenericBitmap *pItemBitmap,
const GenericBitmap *pOpenBitmap,
const GenericBitmap *pClosedBitmap,
uint32_t fgColor,
uint32_t playColor,
uint32_t bgColor1,
uint32_t bgColor2,
uint32_t selColor,
const UString &rHelp,
VarBool *pVisible ):
CtrlGeneric( pIntf,rHelp, pVisible), m_rTree( rTree), m_rFont( rFont ),
m_pBgBitmap( pBgBitmap ), m_pItemBitmap( pItemBitmap ),
m_pOpenBitmap( pOpenBitmap ), m_pClosedBitmap( pClosedBitmap ),
......@@ -132,6 +132,9 @@ int CtrlTree::maxItems()
void CtrlTree::onUpdate( Subject<VarTree> &rTree )
{
// Invalidate the position when the tree is updated
m_lastPos = m_rTree.begin();
autoScroll();
m_pLastSelected = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment