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

Keyboard shortcut should not change current tool if cursor is over an atom #1826

Closed
vanoprenko opened this issue Nov 9, 2022 · 0 comments · Fixed by #1877
Closed

Keyboard shortcut should not change current tool if cursor is over an atom #1826

vanoprenko opened this issue Nov 9, 2022 · 0 comments · Fixed by #1877
Assignees
Milestone

Comments

@vanoprenko
Copy link
Collaborator

Currently when user uses a keyboard shortcut, this always changes current/selected tool, so that all further clicks on canvas will apply this tool (e.g. if 'F' is pressed, current tool will be set to Fluorine atom and applied on mouse clicks until another tool is selected via a button or a shortcut).

This logic should be changed in case mouse cursor is hovering over an atom. If keyboard shortcut is used in such a case, it should not change the current/selected tool. Instead corresponding tool should be applied once while keeping current tool unchanged. E.g. if user has single bond tool selected, puts mouse cursor over an atom and presses 'I', Iodine tool should be applied once but single bond tool to be kept selected and applied on further mouse clicks.

@vanoprenko vanoprenko added this to the Release 2.7.0 milestone Nov 9, 2022
@Nitvex Nitvex linked a pull request Nov 30, 2022 that will close this issue
KonstantinEpam23 pushed a commit that referenced this issue Nov 30, 2022
KonstantinEpam23 added a commit that referenced this issue Dec 1, 2022
* #1826: do not select a hotkey tool if we are hovering over an atom

* #1826: do not select a hotkey tool if we are hovering over an atom / eslint

* #1826: do not select a hotkey tool if we are hovering over an atom / let -> const

* #1826: do not select a hotkey tool if we are hovering over an atom / fix types for hotkeys.js

* #1826: do not select a hotkey tool if we are hovering over an atom / fix import error

Co-authored-by: Konstantin Levin <[email protected]>
@Nitvex Nitvex added the rc.1 label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants