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

FIXES #4070 The Pitch piemenu do not remember the last selected accidental value #4071

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

omsuneri
Copy link
Contributor

@omsuneri omsuneri commented Nov 21, 2024

fixing issue #4070
Now the pitch piemenu remembers the last selected accidental value
custom pitch selected ;
Screenshot 2024-11-22 at 2 02 21 AM
the wheel represents the same value as selected ;
Screenshot 2024-11-22 at 2 02 32 AM


// Store the selected accidental in the block for later use.
prevAccidental = selection["attr"];
block.prevAccidental = prevAccidental;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This retains the value during the session, but not between sessions. Maybe we need to think about saving/restoring this attribute with the block (much the way we do with the start block attributes).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like do you want the pitch block to save the data for last session like this @walterbender

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what should I change in this pr regarding the issue @walterbender

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need to change anything in what you have already done, but in this function in activity.js, this.prepareExport, you can see how some attributes are stored in the start block. We'll want to do something similar with the pitch block. And then restore the state on project import (in loadNewBlocks in blocks.js.

But maybe all that complexity can be dealt with in a separate PR. Let me test this code as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @walterbender i ll make a new PR in regards to these changes and will resolve soon.

@walterbender
Copy link
Member

Hmm. One problem. It does remember the accidental selection, but when I leave the pie menu the 2nd time, it does not display the accident in the pitch block.

Screenshot From 2024-11-21 17-00-50
Screenshot From 2024-11-21 17-00-33
Screenshot From 2024-11-21 17-01-06

@omsuneri
Copy link
Contributor Author

@walterbender yaa i see this issue will make it resolved soon

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

Successfully merging this pull request may close these issues.

2 participants