X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.charts%2Fscl%2FSimantics%2FChart.scl;h=71d20dcce2760e2fc7d29f3fd05a5d3034cc53d2;hp=3972fd95c9317f58730eac5a193037a6ed840775;hb=c26409b1caf2f1e560d37c5befd11b442399c3fe;hpb=bf39e5c2544ec6e60d4e68996a6a7d4a84b30950 diff --git a/bundles/org.simantics.charts/scl/Simantics/Chart.scl b/bundles/org.simantics.charts/scl/Simantics/Chart.scl index 3972fd95c..71d20dcce 100644 --- a/bundles/org.simantics.charts/scl/Simantics/Chart.scl +++ b/bundles/org.simantics.charts/scl/Simantics/Chart.scl @@ -45,11 +45,11 @@ importJava "org.simantics.charts.ui.SCLChart" where Browses the given Model for its Charts and then returns them in a list. """ chartsOf :: Model -> [Chart] -chartsOf model = recurse (toResource model) +chartsOf model = recurse model where recurse r = do - cs = resourceChildrenOf r - charts = map fromResource $ filter isChart cs + cs = children r + charts = filter isChart cs chartGrp = filter isChartGroup cs charts + concatMap recurse chartGrp isChart r = isInstanceOf r CHART.TimeSeriesChart