Skip to content

Unload doesn't clear selection #601

Description

@NadezhdaKatcman

Describe the bug
Unload doesn't clear selection: it removes representations but yellow areas that indicate selection remain.

To Reproduce
Steps to reproduce the behavior:

  1. Have examples build (run yarn ci command)
  2. Open Miew API exampel (.../miew/packages/miew/build/examples/api.html)
  3. Select any part of loaded molecule (click on it)
  4. Click 'Load 4XN6.cif' button

Actual behavior

  • Previously loaded molecules disappear
  • Yellow areas of selection are still on screen

Expected behavior

  • Previously loaded molecules disappear
  • Yellow areas of selection disappear

Screenshots
Before Unload
Image

After Unload
Image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: chrome
  • Version: 138.0.7204.183

Additional context

  • Quick research shows that problem goes from the implementation of Unload: it really doesn't clear the selection. In contrast you can check Reset function and what it clears
  • During fix it will be important also to think about the case when multiple molecules are loaded. If unload was executed for only one molecule then only its selection should be remove

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

Fields

No fields configured for Bug.

Projects

Status
In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions