Transformed selected instances lose selection status
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the provided Python script and the Plugin mouse-click event handler described in the issue; compare the selection behavior when transforming an instance with the behavior when the transform call is replaced by pass. The issue says the script did not reproduce the problem in isolation, so check it in the menu-command context described. Done means a transformed instance remains selected in that context.
Written by the indexing model from the issue text.
Description
Steps to reproduce
- create layout with 1 instance and 1 shape
- test shape
- select shape
- call the script
- OBTAINED: shape was moved
- OBTAINED: shape stays selected, GOOD
- test instance
- select instance
- call the script
- OBTAINED: instance was moved
- EXPECTED: instance stays selected
- OBTAINED: instance no longer selected
EDIT: Hmmm ... can't reproduce it in isolation with the script below.
Is it possible that it behaves differently when it's called from a menu command again?
# Issue: https://github.com/KLayout/klayout/issues/2150
import pya
lv = pya.LayoutView.current()
trans = pya.DTrans(0.5, 0.5)
for o in lv.each_object_selected():
if o.shape is not None:
o.shape.transform(trans)
else:
inst = o.path[0].inst()
inst.transform(trans)
In my setup, basically
- my
Pluginreacts on mouse click event to commit a move operation - then the above code is executed from the event handler
- if i replace the
inst.transform(trans)withpass, the selection is retained
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 305
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 11
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from KLayout/klayout
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
KLayout/klayout#2554 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
KLayout/klayout#2412 · 3 comments ·
Maintainers usually reply within 1 day
-
DRC functions not working properly with clip in placePossibly taken @klayoutmatthias claimed this today. Openbug
KLayout/klayout#2553 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
Deep DRC can miss violations when a cell has many shapesMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
KLayout/klayout#2546 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
LaneDibello/Kotor-Patch-Manager#375 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day