// ----------------------------------------------------------------------- void DisplayObjectErrorsAndWarnings(List <ErrorWarning> errors, List <ErrorWarning> warnings) { // -- Determine wich objects have errors or warnings -- var objectIds = P.append(P.map(e => e.ObjectId, errors), P.map(w => w.ObjectId, warnings)); objectIds = P.removeDuplicates(objectIds); // -- Display the errors/warnings on the objects in the graph -- foreach (var id in objectIds) { // -- Determine if node is visible -- var node = IStorage[id]; if (!DisplayRoot.IsParentOf(node)) { continue; } var pos = node.GlobalPosition; if (!VisibleGraphRect.Contains(pos)) { continue; } // -- Determine errors/warnings for this particular node -- var nodeErrors = P.filter(e => e.ObjectId == id, errors); var nodeWarnings = P.filter(w => w.ObjectId == id, warnings); // -- Display the appropriate error/warning icon -- var r = Math3D.BuildRectCenteredAt(pos, 32f, 32f); r = myGraphics.TranslateAndScale(r); DisplayErrorsAndWarningAt(r, nodeErrors, nodeWarnings); } }