From ae8fd0c60f1d0319fa29821dea0c819c59a017ee Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Fri, 14 Apr 2017 16:35:43 -0700 Subject: [PATCH] graphML: don't draw unconnected LazyModules --- src/main/scala/diplomacy/LazyModule.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/diplomacy/LazyModule.scala b/src/main/scala/diplomacy/LazyModule.scala index c271fa60..1a98b660 100644 --- a/src/main/scala/diplomacy/LazyModule.scala +++ b/src/main/scala/diplomacy/LazyModule.scala @@ -62,7 +62,7 @@ abstract class LazyModule()(implicit val p: Parameters) bindings.reverse.foreach { f => f () } } - def omitGraphML = nodes.isEmpty && children.isEmpty + def omitGraphML: Boolean = !nodes.exists(!_.omitGraphML) && !children.exists(!_.omitGraphML) lazy val graphML: String = parent.map(_.graphML).getOrElse { val buf = new StringBuilder buf ++= "\n"