/*****************************************************************************
* ctrl_tree.cpp
*****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
* $Id$
*
* Authors: Antoine Cellerier <dionoea@videolan.org>
+ * Clément Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
-void CtrlTree::onUpdate( Subject<VarTree, tree_update*> &rTree,
+void CtrlTree::onUpdate( Subject<VarTree, tree_update> &rTree,
tree_update *arg )
{
if( arg->i_type == 0 ) // Item update
notifyLayout();
}
-void CtrlTree::onUpdate( Subject<VarPercent, void*> &rPercent, void* arg)
+void CtrlTree::onUpdate( Subject<VarPercent> &rPercent, void* arg)
{
// Determine what is the first item to display
VarTree::Iterator it = m_flat ? m_rTree.firstLeaf() : m_rTree.begin();
{
it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it );
- } while( it->m_deleted );
+ } while( it != m_rTree.end() && it->m_deleted );
}
}
}
{
it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it );
- } while( it->m_deleted );
+ } while( it != m_rTree.end() && it->m_deleted );
}
else
{
yPos += (pText->getHeight() - ySrc );
delete pText;
}
- do {
- it = m_flat ? m_rTree.getNextLeaf( it )
- : m_rTree.getNextVisibleItem( it );
- } while( it->m_deleted );
+ do
+ {
+ it = m_flat ? m_rTree.getNextLeaf( it )
+ : m_rTree.getNextVisibleItem( it );
+ } while( it != m_rTree.end() && it->m_deleted );
}
stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE );
}