X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fscl%2FSimantics%2FDiagram.scl;h=0ee3e9d28ec03afeec9aff59d69097643472df72;hp=554a25edad081a50f4388688d19820b359440942;hb=b586228b0a54c5b8aa55a31d929d7f24c4fc5f53;hpb=7ffbcb78ddb8c619bd5a88fbbcd6f079cc1684fc diff --git a/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl b/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl index 554a25eda..0ee3e9d28 100644 --- a/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl +++ b/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl @@ -149,9 +149,15 @@ hasRandomIdentifier entity = runProc (claimRelatedValue_ entity L0.identifier GU """Returns all diagrams of the given model.""" diagramsOf :: Model -> [Diagram] -diagramsOf model = recurse - DIA.Diagram - (configurationOf model) +diagramsOf model = diagramsUnder $ configurationOf model + +""" +Returns all diagrams under the specified diagram folder. +The parameter can also be the configuration root `configurationOf` +in which case this function returns the same as `diagramsOf model`. +""" +diagramsUnder :: DiagramFolder -> [Resource] +diagramsUnder folder = recurse DIA.Diagram folder where recurse t r = do cs = children r