mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-06 17:33:25 +02:00
Tiny enhancement of LayoutView#insert_layer
* returns a non-const reference now which can be modified * the node parameter is optional and initialized with a default node
This commit is contained in:
Vendored
+1
-1
@@ -398,7 +398,7 @@ class LAYLayers_TestClass < TestBase
|
||||
new_p.clear_children
|
||||
assert_equal(new_p.has_children?, false)
|
||||
|
||||
assert_equal(ll.has_children?, true)
|
||||
assert_equal(ll.has_children?, false)
|
||||
|
||||
cv.transaction("Delete")
|
||||
li = cv.begin_layers(0)
|
||||
|
||||
Vendored
+24
@@ -375,6 +375,30 @@ class LAYLayoutView_TestClass < TestBase
|
||||
|
||||
end
|
||||
|
||||
def test_3
|
||||
|
||||
# standalone layout view
|
||||
lv = RBA::LayoutView::new
|
||||
|
||||
cv = lv.cellview(lv.create_layout(1))
|
||||
cv.layout.create_cell("TOP")
|
||||
cv.cell = cv.layout.top_cell
|
||||
|
||||
assert_equal(lv.cellview(cv.index).cell.name, "TOP")
|
||||
|
||||
# insert layer with default initializer
|
||||
lp = lv.insert_layer(lv.begin_layers)
|
||||
lp.fill_color = 0xffff31cc
|
||||
assert_equal(lv.begin_layers.current.fill_color, 0xffff31cc)
|
||||
|
||||
lv.clear_layers
|
||||
|
||||
lp = lv.insert_layer(0, lv.begin_layers)
|
||||
lp.fill_color = 0xffff31cc
|
||||
assert_equal(lv.begin_layers.current.fill_color, 0xffff31cc)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
load("test_epilogue.rb")
|
||||
|
||||
Reference in New Issue
Block a user