Skip to content

Problem building a layer tree with "add_child" #464

@klayoutmatthias

Description

@klayoutmatthias

The following code does not produce the expected results:

lv = RBA::LayoutView::current
 
lp = RBA::LayerProperties::new
lp.name = "A"
 
lp = lv.insert_layer(lv.begin_layers, lp)
 
lpp = RBA::LayerProperties::new
lpp = lp.add_child(lpp)
# This does not show up:
lpp.name = "A.1"
 
# Also does not show up:
lppp = RBA::LayerProperties::new
lppp = lpp.add_child(lppp)
lppp.name = "A.1.1"
# ... to here
 
# Also does not show up:
lppp = RBA::LayerProperties::new
lppp = lpp.add_child(lppp)
lppp.name = "A.1.2"
# ... to here
 
lpp = RBA::LayerProperties::new
lpp = lp.add_child(lpp)
lpp.name = "A.2"
 
# Also does not show up:
lppp = RBA::LayerProperties::new
lppp = lpp.add_child(lppp)
lppp.name = "A.2.1"
# ... to here

lppp = RBA::LayerProperties::new
lppp = lpp.add_child(lppp)
lppp.name = "A.2.2"

The expected result is a tree of "A -> ( A.1 -> ( A1.1, A1.2 ), A.2 -> ( A2.1, A2.2 ) ) )".

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions