Ignore:
Timestamp:
02/12/18 18:10:42 (21 months ago)
Author:
jzenisek
Message:

#2839

  • minor changes regarding project- & resource selection
  • adapted DeleteOnNull rules in dbml
File:
1 edited

Legend:

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

    r15742 r15760  
    9595      } else {
    9696        var top = BuildResourceTree(Content);
     97        SetEnabledStateOfControlsForSelectedResource();
     98
    9799        viewHost.Content = top;
     100        bool locked = !IsAdmin();
     101        viewHost.Locked = locked;
     102        scheduleView.Locked = locked;
     103
     104        if (top != null && top.Id == Guid.Empty) {
     105          scheduleView.SetEnabledStateOfSchedule(false);
     106        }
    98107      }
    99108    }
     
    105114      btnRemoveGroup.Enabled = enabled;
    106115      btnSave.Enabled = enabled;
    107       scheduleView.SetEnabledStateOfSchedule(enabled && IsAdmin()); // IsAuthorized((Resource)viewHost.Content));
     116      scheduleView.SetEnabledStateOfSchedule(enabled && IsAdmin());
    108117    }
    109118    #endregion
     
    415424      var stack = new Stack<Resource>(mainResources.OrderByDescending(x => x.Name));
    416425      if (selectedResource != null) selectedResource = resources.Where(x => x.Id == selectedResource.Id).FirstOrDefault();
    417       //bool nodeSelected = false;
     426      bool nodeSelected = false;
    418427
    419428      TreeNode currentNode = null;
     
    432441          selectedResource = newResource;
    433442        }
    434         if (newResource.Id == selectedResource.Id) {
     443        if (newResource.Id == selectedResource.Id && !nodeSelected) {
    435444          newNode.BackColor = selectedColor;
    436445          newNode.Text += " [selected]";
     446          nodeSelected = true;
    437447        }
    438448
     
    490500          slaveNode.Text += " [changes not stored]";
    491501        }
    492         if (slave.Id == selectedResource.Id) {
     502        if (slave.Id == selectedResource.Id && !nodeSelected) {
    493503          slaveNode.BackColor = selectedColor;
    494504          slaveNode.Text += " [selected]";
     505          nodeSelected = true;
    495506        }
    496507      }
Note: See TracChangeset for help on using the changeset viewer.