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

On track selection JBR always repains all tracks #207

Open
iromeo opened this issue Sep 4, 2023 · 0 comments
Open

On track selection JBR always repains all tracks #207

iromeo opened this issue Sep 4, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@iromeo
Copy link
Contributor

iromeo commented Sep 4, 2023

Due to bug in org.jetbrains.bio.browser.desktop.TrackViewRenderComponent#repaintRequired the desired behaviour doesn't work. In repaintRequired there is a code that detects if only the selection was changed in the model. In past tracks rendered selection, but now selection is painted separately above track images => no need to repaint if only selection changed.

Due to bug the function doesn't work as expected:

In function org.jetbrains.bio.browser.desktop.TrackViewRenderComponent#repaintRequired is present comparison browser.uiSettings == lastResult.context, but lastResult.context refers to RenderingContext, while brower.uiSettings describes global browser settings. So they never are equal in check is always false

Suggestion: If only selection is changed, do not trigger repaint require event, e.g. in TrackListController.modelChanged() handler. Likely we need to detect that only selection changed and skip

 trackToComponentMap.values.forEach(TrackViewComponent::repaintRequired)

invocation.

modelChanged

@iromeo iromeo added the bug Something isn't working label Sep 4, 2023
@iromeo iromeo added this to the JBR 1.1 milestone Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant