Changeset 15635


Ignore:
Timestamp:
01/19/18 22:49:04 (19 months ago)
Author:
swagner
Message:

#2877: Improved groups/slaves treeview of Hive Administrator

  • prevented indirect cycles in parent relationshop of groups, which caused an endless loop
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2877_HiveImprovements/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs

    r15631 r15635  
    383383      var group = node?.Tag as SlaveGroup;
    384384
    385       if ((resources != null) && (node != null) && (group != null) && IsAuthorized(group) && (!resources.Contains(group))) {
    386         if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move;
     385      if ((resources != null) && (node != null) && (group != null) && IsAuthorized(group) && !resources.Contains(group)) {
     386        while ((node != null) && ((group == null) || !resources.Contains(group))) {  // prevent cycles in groups
     387          node = node.Parent;
     388          group = node?.Tag as SlaveGroup;
     389        }
     390        if ((node == null) && e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move;
    387391      }
    388392    }
Note: See TracChangeset for help on using the changeset viewer.