A cell can be locked using
cell.locked = true
and unlocked again using
cell.locked = false
Also, cell.is_locked? can be used to test the locked state.
In locked state writing shapes and instances is forbidden
and doing so would raise an exception.
Also, cells cannot be deleted when locked. However, Layout#clear
and Layout#_destroy are always available.
Cells can still be renamed, even if locked.
- For Cell#shapes, LayerInfo is an accepted argument now
- If the layer does not exist, it is created (non-const version)
or an error is raised (const version)
- Cell#clear also accepts a LayerInfo object
- Layout#clear and Layout#delete_layer also accept
a LayerInfo parameter
Rationale for supporting the clear and delete_layer methods:
These cases do nothing if the layer does not exist, so there
is a benefit of using them: it is not required to check first
if the layer exists.