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

selecting, little improfments #1934

Open
olisnr opened this issue Nov 25, 2024 · 11 comments
Open

selecting, little improfments #1934

olisnr opened this issue Nov 25, 2024 · 11 comments
Assignees

Comments

@olisnr
Copy link

olisnr commented Nov 25, 2024

i would like some changes:

  1. a move-mode that only moves already selected things.
  2. a change after cntr-V or B to this move mode
  3. a selection-rectangle, that only select inside, but is modifiable to also select touching, may be per modifier key shift or so, or via the direction how the rectangle is drawn (left-right/up-down or reverse).
  4. the option to filter cells that dont fit in the current view out of the selection
@klayoutmatthias
Copy link
Collaborator

Hi @olisnr,

I think this refers to this discussion: https://www.klayout.de/forum/discussion/2624/how-to-lock-cells

regarding 1: if you have selected things, move only selects those.

regarding 2: In File/Setup, under Application/Customize Menu you find at the bottom of the list of functions some "Key binding targets". These are functions that cannot be bound to menus in a reasonable way. Among this is "Paste interactive" which does what you look for. Just bind it to a key (Cadence-like is "H"). Also try "Move Interactive" (M) or "Duplicate interactive" (C)

regarding 3: the modifier keys are all taken already. It was suggested once to modify the selection behavior depending on how you drag the rectangle.

regarding 4: I think that means for click selection - don't select cells that are covering the view entirely.

Matthias

@olisnr
Copy link
Author

olisnr commented Nov 26, 2024

hallo @klayoutmatthias
its exactly from this discussion :)
regarding 1: im perfect happy with the move after selection. my problem, is, that if i forget to press "esc" or press an other key per accident after it, i destroy things when i try to select via rectangle.
if i could have a move-mode, that isnt able to select things, or a move-mode, that jumps back into the select mode after ending the movement, i would feel safe :)
2: thanks, thats what i wanted.
3: yes, the way how to draw the rectangle is a good way to select the select mode.
4: that was You suggestion, i think. and it sound very reasonable to me.

@klayoutmatthias
Copy link
Collaborator

I have implemented two enhancements and they will go into 0.29.9:

  • The status bar now shows what is selected - previously it did not fall back to "nothing". Maybe that helps to remember that you are dragging something for 1.
  • Point-and-click now does not select objects (shapes, instances), if their edges are outside the view. So potentially "hollow" objects can't be selected without noticing.
  1. will come later.

Matthias

@klayoutmatthias klayoutmatthias self-assigned this Nov 30, 2024
@adrienluitot
Copy link

Maybe for the selection rectangle (3) it might be an option in setup?

I think most people whether prefer inner selection or touching selection. But you get use to it and adapt the way you select depending on your habit.
I think it's pretty rare to want a inner select and then few minutes after a touching select. Maybe I'm wrong?

This option would be pretty easy to implement and would not require any key modifier or unusual behaviour.

@olisnr
Copy link
Author

olisnr commented Dec 2, 2024

dear @klayoutmatthias did version 0.29.9 change also something with the shortcuts? it seem that my settings for
edit_menue.mode_menue.ruler r, move, box and so on dont work anymore.

setup shortcut

Snap to other objects seems not to work anymore in the Partial mode.

and then i would also like to know, if the Editor Options can be configured to stay open for ever?

@olisnr
Copy link
Author

olisnr commented Dec 2, 2024

snap.mp4

@klayoutmatthias
Copy link
Collaborator

Thanks for the hints.

I can reproduce the issues.

Problem with the key bindings is internal - actually there is are bindings for the same thing (tool bar button and menu entry) and priority changed. That is a old topic I have not taken care of that so far. It needs fixing.

Also, the partial mode object snapping has changed: it is working, but grid snapping has higher priority now. So if the objects you snap to are off-grid, the edges won't snap to the objects. I can try to fix that as well.

Sorry for the inconvenience. It is a very busy time currently and there is too little time to do things properly.

Matthias

@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented Dec 2, 2024

I fixed the problem with the partial mode snap and the key binding issue.

Partial mode now does a smarter snapping that both considers the edge snap against plus the grid - the grid only along the edge, not perpendicular to it.

The key binding problem is actually a bug in the old versions, the new one only triggered it.

The next version will properly read the configurations again. However, there is a caveat: if you switch back to old versions, the configuration will already be spoiled for them. So they do not properly read key bindings that go to toolbar items. Even "Reset key bindings "will not help.

In order to fix the configuration back to something useful for old versions, you have to edit the configuration file (in ~/.klayout/klayoutrc or c:\user\<you>\KLayout\klayoutrc): delete the "key-bindings" element and re-configure the key bindings or from the list inside that element delete all entries pointing to @toolbar... paths.

@klayoutmatthias
Copy link
Collaborator

This is the PR that should fix the last two problems: #1943

@olisnr
Copy link
Author

olisnr commented Dec 3, 2024

super! thanks!

a observation with snapping of paths, via the Paritial mode was, that sometime i end up off-grid. and i think, its the case if i "grab" the middle-line of the path. i think, if i grab the endpoint, thats never happened.
with the endpoint at the other hand, sometime the path ignores the manhatten-rule in the Paritial mode.
but this is from older versions then the .29.9...

@klayoutmatthias
Copy link
Collaborator

Yes, well. I played a lot to make the Partial snapping intuitive under object snapping, grid snapping and move constraints. That is really a challenge. With the latest change I thought I got it right - observing grid and object snapping, but then grid snapping got too strong.

I am confident the hotfix will provide a better solution. But I will test it first before releasing.

Master is up to date already and there are (unsigned) builds here if you like to test it: https://www.klayout.org/downloads/master/

Matthias

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

No branches or pull requests

3 participants