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

Incorrect merging of Functional Groups #2110

Closed
yuleicul opened this issue Jan 19, 2023 · 1 comment · Fixed by #2179
Closed

Incorrect merging of Functional Groups #2110

yuleicul opened this issue Jan 19, 2023 · 1 comment · Fixed by #2179

Comments

@yuleicul
Copy link
Collaborator

yuleicul commented Jan 19, 2023

Steps to Reproduce

  1. Use the select tool to select a functional group or paste a functional group from clipboard
  2. Drag it close to other structure (such as a benzene)
  3. Click on the canvas to insert the functional group

Actual behavior
After step 2, there may be multiple highlighted green circles that indicate atoms to be merged, and the circles correspond to the atoms inside the expanded functional group.
After step 3, there may be multiple functional groups being merged.
Additionaly, the group may get merged with other structures that are in close proximity.

Expected behavior
Contracted functional group should ignore all atoms apart form attachment point when dragging (and/or pasting)

Additional info
It looks like a contracted functional group is being treated as an expanded one while it is being dragged along the canvas, hence it is showing multiple connection points wherever atoms of an expanded group are located.
Based on the reproduction steps:
After step 2, there will be only one highlighted green circle that indicates the unique attachment atom of the functional group.
After step 3, there will be only one functional group being merged and it will be merged only to the structure that is highlighted

Example of correct merge of functional group:
image

Salts or solvents are special case of this behaviour and they are not supposed to be merged at all. Example of adding salt or solvent to canvas over benzene ring:
image

Screenshots
ketcher-paste-bug-06

Ketcher version
v2.7.0 (remote rc version)

Additional context
Two related bugs:

The correct behavior is described in the ticket #2394

#184100466

@yuleicul yuleicul assigned Nitvex and unassigned Nitvex Jan 19, 2023
@yuleicul yuleicul added this to the Release Candidate 2.8.0-rc.1 milestone Jan 20, 2023
St-Permiakov pushed a commit that referenced this issue Feb 1, 2023
St-Permiakov pushed a commit that referenced this issue Feb 1, 2023
St-Permiakov pushed a commit that referenced this issue Feb 1, 2023
St-Permiakov pushed a commit that referenced this issue Feb 2, 2023
St-Permiakov pushed a commit that referenced this issue Feb 2, 2023
St-Permiakov pushed a commit that referenced this issue Feb 6, 2023
St-Permiakov pushed a commit that referenced this issue Feb 6, 2023
St-Permiakov pushed a commit that referenced this issue Feb 6, 2023
St-Permiakov pushed a commit that referenced this issue Feb 8, 2023
St-Permiakov pushed a commit that referenced this issue Feb 8, 2023
St-Permiakov pushed a commit that referenced this issue Feb 10, 2023
St-Permiakov pushed a commit that referenced this issue Feb 13, 2023
St-Permiakov pushed a commit that referenced this issue Feb 14, 2023
St-Permiakov added a commit that referenced this issue Feb 14, 2023
* #2110 - Drag-n-drop fix for group interaction

* #2110 - sync select and paste behavior for groups

* #2110 - Unification and extraction of Select and Paste tools logic - {WiP}

* #2110 - some select mouseup refactor

* #2110 - refactor and separate logic of select and paste mousemove

* #2110 - shared utils hotfix

* #2110 - improvements to code transparency

* #2110 - fix getnongroupitems method

---------

Co-authored-by: Stanislav Permiakov <Stanislav.Permiakov@primark.onmicrosoft.com>
ansivgit pushed a commit that referenced this issue Feb 22, 2023
* #2110 - Drag-n-drop fix for group interaction

* #2110 - sync select and paste behavior for groups

* #2110 - Unification and extraction of Select and Paste tools logic - {WiP}

* #2110 - some select mouseup refactor

* #2110 - refactor and separate logic of select and paste mousemove

* #2110 - shared utils hotfix

* #2110 - improvements to code transparency

* #2110 - fix getnongroupitems method

---------

Co-authored-by: Stanislav Permiakov <Stanislav.Permiakov@primark.onmicrosoft.com>
@Zhirnoff
Copy link
Collaborator

At the moment, the ticket is supposedly not working correctly due to a bug #2326
The correct behavior is described in the ticket #2394

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.

5 participants