diff --git a/core/compiler/src/gds.rs b/core/compiler/src/gds.rs index 82fdd18..6177e91 100644 --- a/core/compiler/src/gds.rs +++ b/core/compiler/src/gds.rs @@ -107,10 +107,7 @@ impl CompiledData { let mut ocell = GdsStruct::new(name.to_string()); for (_, obj) in &cell.objects { match obj { - SolvedValue::Rect(rect) => { - if rect.construction { - continue; - } + SolvedValue::Rect(rect) if !rect.construction => { if let Some(layer) = &rect.layer { let GdsLayerSpec { layer, @@ -148,7 +145,7 @@ impl CompiledData { ..Default::default() })); } - SolvedValue::Instance(i) => { + SolvedValue::Instance(i) if !i.construction => { if exporter.names.name(&i.cell).is_none() { self.cell_to_gds(exporter, i.cell)?; } diff --git a/core/gui/src/editor/canvas.rs b/core/gui/src/editor/canvas.rs index 9233e32..610eb7e 100644 --- a/core/gui/src/editor/canvas.rs +++ b/core/gui/src/editor/canvas.rs @@ -494,6 +494,9 @@ impl Element for CanvasElement { } } SolvedValue::Instance(inst) => { + if inst.construction { + continue; + } let mut inst_mat = TransformationMatrix::identity(); if inst.reflect { inst_mat = inst_mat.reflect_vert()