[vlc-commits] commit: skins2: add a method to flag a whole subtree for deletion ( Erwan Tulou )

git at videolan.org git at videolan.org
Tue Aug 10 18:57:07 CEST 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Tue Aug 10 13:41:06 2010 +0200| [98c1ff6e3d80c30af01c0c211c0ead8964d3d8a1] | committer: Erwan Tulou 

skins2: add a method to flag a whole subtree for deletion

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98c1ff6e3d80c30af01c0c211c0ead8964d3d8a1
---

 modules/gui/skins2/utils/var_tree.cpp |    8 ++++++++
 modules/gui/skins2/utils/var_tree.hpp |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules/gui/skins2/utils/var_tree.cpp b/modules/gui/skins2/utils/var_tree.cpp
index a6fb750..66d1460 100644
--- a/modules/gui/skins2/utils/var_tree.cpp
+++ b/modules/gui/skins2/utils/var_tree.cpp
@@ -405,3 +405,11 @@ VarTree::Iterator VarTree::firstLeaf()
     return b;
 }
 
+void VarTree::cascadeDelete()
+{
+    m_deleted = true;
+    for( Iterator it = begin(); it != end(); ++it )
+    {
+        it->cascadeDelete();
+    }
+}
diff --git a/modules/gui/skins2/utils/var_tree.hpp b/modules/gui/skins2/utils/var_tree.hpp
index 7be58ad..26709e3 100644
--- a/modules/gui/skins2/utils/var_tree.hpp
+++ b/modules/gui/skins2/utils/var_tree.hpp
@@ -165,6 +165,9 @@ public:
     /// Ensure an item is expanded
     void ensureExpanded( VarTree::Iterator );
 
+    /// flag a whole subtree for deletion
+    void cascadeDelete();
+
     /// Get depth (root depth is 0)
     int depth()
     {



More information about the vlc-commits mailing list