~ubuntu-branches/ubuntu/precise/gnome-do/precise-backports

« back to all changes in this revision

Viewing changes to Do/src/Do.Core/ItemExtensions.cs

  • Committer: Package Import Robot
  • Author(s): Evan Broder
  • Date: 2012-05-11 10:51:46 UTC
  • mfrom: (0.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120511105146-b9t7b6qoxpl6q9y0
Tags: 0.9-1~precise1
No-change backport to precise (LP: #994424)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
                        has_children = new Dictionary<Item, bool> ();
38
38
                }
39
39
 
40
 
                public static bool HasChildren (this Item self) {
 
40
                public static bool HasChildren (this Item self)
 
41
                {
41
42
                        if (!has_children.ContainsKey (self)) {
42
 
                                has_children [self] = PluginManager.ItemSources
43
 
                                        .Any (source => source.Safe.ChildrenOfItem (self).Any ());
 
43
                                has_children[self] = self.GetChildren ().Any ()
 
44
                                        ||
 
45
                                        PluginManager.ItemSources
 
46
                                        .Any (source => source.Safe.ChildrenOfItem (self).Any ())
 
47
                                        ||
 
48
                                        PluginManager.DynamicItemSources
 
49
                                        .Any ((source) => source.ChildrenOfItem (self).Any());
44
50
                        }
45
51
                        return has_children [self];
46
52
                }