]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/controls/ctrl_tree.cpp
Qt4 - Typo correction.
[vlc] / modules / gui / skins2 / controls / ctrl_tree.cpp
index 108d1ff7bd780463d5a7bde7dd1b27f82af06bdb..0c27d34d6312fde6cac0a071c2191558aef67df3 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  * 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
@@ -140,7 +141,7 @@ int CtrlTree::maxItems()
 }
 
 
-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
@@ -189,7 +190,7 @@ void CtrlTree::onUpdate( Subject<VarTree, tree_update*> &rTree,
     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();
@@ -792,7 +793,7 @@ void CtrlTree::makeImage()
                 {
                     it = m_flat ? m_rTree.getNextLeaf( it )
                                 : m_rTree.getNextVisibleItem( it );
-                } while( it->m_deleted );
+                } while( it != m_rTree.end() && it->m_deleted );
             }
             else
             {
@@ -856,9 +857,10 @@ void CtrlTree::makeImage()
             yPos += (pText->getHeight() - ySrc );
             delete pText;
         }
-        do {
-        it = m_flat ? m_rTree.getNextLeaf( it )
-                    : m_rTree.getNextVisibleItem( it );
+        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 );