Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/issue 1963 #1965

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Feature/issue 1963 #1965

merged 4 commits into from
Jan 17, 2025

Conversation

klayoutmatthias
Copy link
Collaborator

@klayoutmatthias klayoutmatthias commented Jan 4, 2025

Implemented a solution for #1963 (locking cells)

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.

Matthias Koefferlein added 4 commits January 4, 2025 19:32
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.
@klayoutmatthias klayoutmatthias linked an issue Jan 4, 2025 that may be closed by this pull request
@sebastian-goeldi
Copy link
Contributor

Thank you so much Matthias! This is awesome

@joamatab
Copy link
Contributor

joamatab commented Jan 5, 2025

Thank you Matthias, this would be very helpful for GDSFactory, looking forward to the next KLayout release!

@klayoutmatthias klayoutmatthias merged commit 03e67f6 into master Jan 17, 2025
26 checks passed
@klayoutmatthias klayoutmatthias deleted the feature/issue-1963 branch January 17, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add lock to Cell
3 participants